title: Does not conform to protocol "UIPickerViewDataSource"
body: <p>Why doesn't the view controller conform the UIPickerViewDataSource?</p>
  
  <p>I have checked everything I could do to debug it from the web.</p>
  
  <p>I have typed all the necessary functions for the protocols (Swift 3.1) but in vain.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>class SelectClassViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource {
      let grades = ["7", "8", "9", "10", "11", "12"]
  
      var selectCurrentGrade : String? = nil
  
      @IBOutlet weak var Grade: UIPickerView!
  
      @IBAction func Next(_ sender: Any) {
          if selectCurrentGrade != nil {
              performSegue(withIdentifier: "GradeToClass", sender: self)
          }
      }
  
      @IBAction func Back(_ sender: Any) {
          performSegue(withIdentifier: "GradeToMain", sender: self)
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          func numberOfComponents(in pickerView: UIPickerView) -&gt; Int {
              return 1
          }
  
          func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -&gt; String? {
              return grades[row]
          }
  
          func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -&gt; Int {
              return grades.count
          }
  
          func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
              selectCurrentGrade = grades[row]
          }
      }
  }
  </code></pre>