title: UIPickerView display question mark
body: <p>I'm trying to display Blood type in PickerView, but for some reason the choices are displayed as question marks only !</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    class RegisterViewController: UIViewController, UIPickerViewDataSource, UIPickerViewDelegate {
      //Methods for PickerViewDataSource
  
      @available(iOS 2.0, *)
      public func numberOfComponents(in pickerView: UIPickerView) -&gt; Int {
          return 1
      }
      func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -&gt; Int {
          return pickerDataSource.count;
      }
  
      func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -&gt; String! {
          return pickerDataSource[row]
      }
  
      @IBOutlet weak var selectedDate: UILabel!
      @IBOutlet weak var birthDatePicker: UIDatePicker!
  
      @IBOutlet weak var mobileNumberField: UITextField!
      @IBOutlet weak var emailField: UITextField!
      @IBOutlet weak var nameField: UITextField!
  
      @IBOutlet weak var bloodTypePicker: UIPickerView!
  
      @IBOutlet weak var selectedType: UILabel!
  
      let pickerDataSource = ["Group A", "Group B", "Group AB", "Group O"];
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view.
          super.viewDidLoad()
          self.bloodTypePicker.dataSource = self;
          self.bloodTypePicker.delegate = self;
  
      }
  
      func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
      {
          if(row == 0)
          {
              self.selectedType.text = "Group A"
          }
          else if(row == 1)
          {
              self.selectedType.text = "Group B"
          }
          else if(row == 2)
          {
              self.selectedType.text = "Group AB"
          }
          else
          {
              self.selectedType.text = "Group O"
          }
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      @IBAction func datePickerAction(_ sender: Any) {
  
          var dateFormatter = DateFormatter()
          dateFormatter.dateFormat = "dd-MM-yyyy"
          var strDate = dateFormatter.string(from: birthDatePicker.date)
          self.selectedDate.text = strDate
  
      }
  
  }
  </code></pre>
  
  <p>and here is a screenshot of what is displayed:</p>
  
  <p><a href="https://i.stack.imgur.com/OgoxP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OgoxP.png" alt="enter image description here"></a></p>
  
  <p>I was following this tutorial: <a href="http://sourcefreeze.com/ios-uipickerview-example-using-swift/" rel="nofollow noreferrer">http://sourcefreeze.com/ios-uipickerview-example-using-swift/</a></p>
  
  <p>Thanks in advance.</p>