I cannot get textFieldShouldEndEditing to call. I have re created the links in interface builder and tried, but nothing seems to work. Any idea why this would not be called?
Edit
-(BOOL)textFieldShouldEndEditing:(UITextField *)textField
{
NSLog(@"Done editing...");
[textField resignFirstResponder];
return YES;
}
Try this code .
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[Self.view EndEditing:YES];
return YES;
}
Also use _myTextField.delegate = self
; in your ViewDidLoad
And in your .h file, add <UITextFieldDelegate>
after the name of your class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With