Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.48 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Close the keyboard on UITextField
  2. @interface ComposeViewController : UIViewController {
  3.  id <ComposeViewControllerDelegate> delegate;
  4.  IBOutlet UITextField *notificationTitle;
  5. }
  6.        
  7. - (BOOL)textFieldShouldReturn:(UITextField *)textField {
  8.    if (textField == yourTextField) {
  9.        [textField resignFirstResponder];
  10.    }
  11.    return NO;
  12. }
  13.        
  14. yourTextField.delegate = self
  15.        
  16. - (BOOL)textFieldShouldReturn:(UITextField *)textField
  17. {
  18.    [yourTextField resignFirstResponder];
  19.    return NO;
  20. }