I would like to call my login method AFTER the keyboard was dismissed – since I want to start animation and change the UIView alpha to 0.5 until the response.
- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
if (theTextField == self.passwordText){
//hide the keyboard
[theTextField resignFirstResponder];
[self validateCredentialsRemotely];
}else{
[self.passwordText becomeFirstResponder];
}
return YES;
}
The keyboard is not being dismissed before the call to the method validateCredentialsRemotely and the screen freezes while the keyboard is displayed. I would like it to be dismissed first, and then call the method.
Use this notifications..
In keyboardWillHide method call your validateCredentialsRemotely method,This may solve your first issue