Is there a NSNotification for objects that become first resoponder?
Is ther开发者_运维百科e 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.
精彩评论