I have a UITextFiled to which I applied the delegate to close the keyboard by pressing "done".
...
textfield.returnKeyType = UIReturnKeyDone;
textfield.delegate = self;
....
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return YES;
}
How do I invoke a method when I press "done"?
Is it that what you want ?
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
[add your method here];
return YES;
}
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