title: Show UIPicker when my UITextField is selected
body: <p>I am trying to show a UIPicker that it is initially hidden whenever I touch/select/press my UITextField.</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>class RegistrationViewController: UIViewController, UIPickerViewDelegate, UITextFieldDelegate {
  
      @IBOutlet var getGender: UIPickerView! = UIPickerView()
  
      @IBOutlet var genderTextField: UITextField! = nil
  
      @IBOutlet var passTextField: UITextField!
  
      @IBOutlet var repassTextField: UITextField!
  
  
  
      let gender = ["Male", "Female", "Other"]
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          genderTextField.delegate = self
  
          passTextField.secureTextEntry = true
          repassTextField.secureTextEntry = true
  
          getGender.hidden = true
  
  
          if(genderTextField.becomeFirstResponder()){
  
          }
  
          // Do any additional setup after loading the view.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      // returns the number of 'columns' to display.
      func numberOfComponentsInPickerView(pickerView: UIPickerView!) -&gt; Int{
          return 1
      }
  
      // returns the # of rows in each component..
      func pickerView(pickerView: UIPickerView!, numberOfRowsInComponent component: Int) -&gt; Int{
          return gender.count
      }
  
      func pickerView(pickerView: UIPickerView!, titleForRow row: Int, forComponent component: Int) -&gt; String! {
          return gender[row]
      }
  
      func pickerView(pickerView: UIPickerView!, didSelectRow row: Int, inComponent component: Int)
      {
          genderTextField.text = "\(gender[row])"
  
      }
  </code></pre>
  
  <p>I have everything set up so the genderTextField changes its value whenever you select the values from the getGender UIPicker. However, I did not success with trying to make the pickerView show up whenever I click the genderTextField.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks a lot in advance!</p>