title: Changing UITextfield from Non-Editable to Editable - Swift
body: <p>I am trying to have two non-editable <code>UITextField</code> display <em>name</em> and <em>age</em>.  I have an <strong>Edit</strong> <code>UIBarButtonItem</code> in my Navigation Bar that I want to be able to trigger the <code>UITextField</code> to be editable when that button is pressed.</p>
  
  <p>In my Interface Builder, I have the User Interaction Enabled option unchecked for the two UITextFields.  Do I need to add <code>ageText.UserInteractionEnabled = true</code>? I'm at a loss here.</p>
  
  <pre><code>class UserProfileVC: UIViewController, 
  UITextFieldDelegate, UINavigationControllerDelegate {
  
      @IBOutlet weak var infoBorder: UILabel!
      @IBOutlet weak var nameText: UITextField!
      @IBOutlet weak var ageText: UITextField!
  
      var textFields:[UITextField] = []
  
      @IBAction func editButton(sender: UIBarButtonItem) {
          nameText.becomeFirstResponder()
          ageText.becomeFirstResponder()
      }
  
      func textFieldShouldReturn(textField: UITextField) -&gt; Bool {
          var currentTextField = textFields[0]
  
          if (currentTextField == textField) {
              currentTextField = textFields[1]
              currentTextField.becomeFirstResponder()
          } else {
              currentTextField.resignFirstResponder()
          }
  
          return true
      }
  }
  </code></pre>