Search code examples
iphoneiosuitextfieldfirst-responderbecomefirstresponder

get notified when UITextField becomeFirstResponder


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.


Solution

  • You will need to be come the text field's delegate and implement this optional delegate method:

    - (void)textFieldDidBeginEditing:(UITextField *)textField;