Friday, 23 August 2013

How to remove keyboard. Normal method not working. objective-c

How to remove keyboard. Normal method not working. objective-c

I have this code.
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
//If user presses next go to next textfield
if (textField == self.emailTextField) {
[textField resignFirstResponder];
[self.passwordTextField becomeFirstResponder];
}
else if (textField == self.passwordTextField) {
[self.passwordTextField resignFirstResponder];
}
return YES;
}
This line below runs but all it does is make the textfield inactive and
leaves the keyboard there. Then if you tap on the keys on keyboard then it
does nothing.
[self.passwordTextField resignFirstResponder];
This is not a duplicate question because the normal method is not working
for some reason.

No comments:

Post a Comment