Reputation: 240860
-(BOOL) textFieldShouldReturn:(UITextField*) theTextField{
[theTextField resignFirstResponder];
return YES;
}
it is not working....
Upvotes: 2
Views: 3313
Reputation: 17132
This answer demonstrates that the delegate decides whether or not to dismiss the keypad.
If you want to dismiss the keypad, textFieldShouldReturn: must return NO:
-(BOOL) textFieldShouldReturn:(UITextField*) theTextField{
[theTextField resignFirstResponder];
return NO;
}
Upvotes: 3