问题描述:

Is there a NSNotification for objects that become first responder.

Like NSNotification that give me the UITextfield that cause the keyboard to pop up?

网友答案:

Check UITextFieldTextDidBeginEditingNotification, the textField that started editing is in notification's object property.

There're also UIKeyboardWillShowNotification and UIKeyboardDidShowNotification notifications

网友答案:

Another option is to have your view controller be a delegate to the UITextField. UITextFieldDelegate has a textFieldDidBeginEditing: method.

网友答案:

No, But you could check it manually by using "IsFirstResponder" (BOOL).. Can you explain a little bit more what you want to accomplish? Maybe there is a way to use another notification.

相关阅读:
Top