How I can get notified when UITextField
becomeFirstResponder
?
I can check like isFirstResponder
or set to to become first Responder by becomeFirstResponder
I want to get notified or handle an event when a user make this text field first responder.
Thanks.
You will need to be come the text field's delegate and implement this optional delegate method:
- (void)textFieldDidBeginEditing:(UITextField *)textField;
Besides implementing the UITextFieldDelegate
method textFieldDidBeginEditing:
, you can register for the UITextFieldTextDidBeginEditingNotification
notification.
The notification method could be:
- (void)someTextFieldDidBeginEditing:(NSNotification *)notification { UITextField *textField = (UITextField *)notification.object; }
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