如何检查iPad键盘的隐藏按钮是否被按下? [英] How can I check if the hide button pf iPad's keyboard was pressed?
本文介绍了如何检查iPad键盘的隐藏按钮是否被按下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想触发一个函数,该函数将取决于用户用来为textField的第一响应者签名的方法.如果通过选择另一个textField对其进行了签名,则它将不执行任何操作,否则将触发一个函数.这可能吗?
I want to trigger a function that will depend on which method the user used to resign a textField's first responder. If it was resigned by selecting another textField, it does nothing, else triggers a function. Is this possible?
推荐答案
了解如何操作.您只需要听UIKeyboardWillHideNotification
通知:
Found out how. You just have to listen to the UIKeyboardWillHideNotification
notification:
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodYouWantToCall) name:UIKeyboardWillHideNotification object:nil];
}
- (void)methodYouWantToCall {
//Do anything you want here
}
这篇关于如何检查iPad键盘的隐藏按钮是否被按下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文