开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜