
Untitled
By: a guest on
Jul 4th, 2012 | syntax:
None | size: 0.48 KB | hits: 12 | expires: Never
Close the keyboard on UITextField
@interface ComposeViewController : UIViewController {
id <ComposeViewControllerDelegate> delegate;
IBOutlet UITextField *notificationTitle;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
if (textField == yourTextField) {
[textField resignFirstResponder];
}
return NO;
}
yourTextField.delegate = self
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[yourTextField resignFirstResponder];
return NO;
}