On the iPad for any any non-fullscreen presented ViewController, you must implement -(BOOL)disablesAutomaticKeyboardDismissal
to return NO
to dismiss the keyboard.
- (BOOL)disablesAutomaticKeyboardDismissal
{
return NO;
}
Once that is implemented, you can call [self.view endEditing:YES];
.
Edit:
The other common cause of this problem is returning NO
from - (BOOL)textFieldShouldEndEditing:(UITextField *)textField
. Implement the method in the UITextFieldDelegate and have it return YES
unconditionally to prove that it is not a factor.