iPad popover textfield - resignFirstResponder doesn't dismiss keyboard
Posted
by mosdev
on Stack Overflow
See other posts from Stack Overflow
or by mosdev
Published on 2010-04-16T16:09:47Z
Indexed on
2010/04/16
19:23 UTC
Read the original article
Hit count: 851
I have two text fields email and password. The following code works fine when the fields are presented on a regular view but when they are on a popover, the resignFirstResponder does not work (becomeFirstResponder works). textFieldsShouldReturn was called for both fields. Any idea if I am missing something? Thanks!
- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
if (theTextField == email) {
[password becomeFirstResponder];
return NO;
}
[theTextField resignFirstResponder];
return NO;
}
© Stack Overflow or respective owner