title: Code doesn't conform to picker view protocols. Problems using UIAlertControllerStyle
body: <p>I'm new to Swift coding but have used C++ and other languages but I keep getting the "does not conform" error on the line:</p>
  
  <pre><code>class CaloriesInputViewController: UIViewController, UIPickerViewDelegate , UITextFieldDelegate, UIPickerViewDataSource`
  </code></pre>
  
  <p>Also, further down where ever it says <code>UIAlertControllerStyle</code> I keep getting an:</p>
  
  <blockquote>
    <p>"Extra argument 'message' in call"</p>
  </blockquote>
  
  <pre><code>import UIKit
  import Parse
  
  class CaloriesInputViewController: UIViewController, UIPickerViewDelegate , UITextFieldDelegate, UIPickerViewDataSource{
      //Properties for food input detail
      @IBOutlet weak var foodName: UITextField!
      @IBOutlet weak var caloriesAmount: UITextField!
      @IBOutlet weak var pickerView: UIPickerView!
  
      var mealType: String = ""
  
      var pickerDataSource = ["Breakfast", "Lunch", "Dinner", "Snacks"];
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          self.navigationController?.isNavigationBarHidden = true
          self.pickerView.dataSource = self
          self.pickerView.delegate = self
  
          initializeTextFields()
      }
  
      func numberOfComponentsInPickerView(pickerView: UIPickerView) -&gt; Int {
          return 1
      }
  
      func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -&gt; Int {
          return pickerDataSource.count;
      }
  
      private func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -&gt; String! {
          return pickerDataSource[row]
      }
  
      private func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
      {
          if(row == 0)//Breakfast
          {
              mealType = "Breakfast"
          }
          else if(row == 1)//Lunch
          {
              mealType = "Lunch"
          }
          else if(row == 2)//Dinner
          {
              mealType = "Dinner"
          }
          else//Snacks
          {
              mealType = "Snacks"
          }
      }
  
      //Function to food details
      @IBAction func addCalories(sender: AnyObject) {
          if(foodName.text!.isEmpty || (caloriesAmount.text!.isEmpty) || mealType.isEmpty){
              //Output an Alert
              var alert = UIAlertControllerStyle(title: "Data Required", message: "Please enter all required information", delegate: self, cancelButtonTitle: "OK")
              alert.show()
  
          }
          else{
              //Create a foodLog object in Parse
              var foodLog = PFObject(className: "foodLog")
  
              //Put user food detail into foodLog
              foodLog["foodName"] = foodName.text
              foodLog["caloriesCount"] = caloriesAmount.text
              foodLog["mealType"] = mealType
              foodLog["user"] = PFUser.current()!
  
              //Save data
              foodLog.saveInBackground()
  
              //Output an alert informing a user that the password or username did not meet the requirements
              var alert = UIAlertControllerStyle(title: "Recorded", message: "Your calories were recorded", delegate: self, cancelButtonTitle: "OK")
              alert.show()
  
              //Redirect a user to a log view controller
              self.navigationController?.popViewController(animated: true)
          }
      }
  }
  </code></pre>