title: UITextField delegate
body: <p>I have a <code>UITextFiled</code> to which I applied the delegate to close the keyboard by pressing "done".</p>
  
  <pre><code>    ...
      textfield.returnKeyType = UIReturnKeyDone;
      textfield.delegate = self;
      ....
  
  - (BOOL)textFieldShouldReturn:(UITextField *)textField {
  
      [textField resignFirstResponder];
      return YES;
  }
  </code></pre>
  
  <p>How do I invoke a method when I press "done"?</p>