如何检测国际键盘的隐藏事件?
UIKeyboardDidHideNotification
似乎没有触发。
下面的相关链接没有帮助。
更多信息
这就是我为两者设置通知的UIKeyboardDidHideNotification
方式UIKeyboardDidShowNotification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil];
-(void)keyboardDidShow:(NSNotification*)notification {
NSLog(@"keyboardDidShow");
}
-(void)keyboardDidHide:(NSNotification*)notification {
NSLog(@"keyboardDidHide");
}
keyboardDidShow
被触发两次。首先是标准键盘弹出时。其次是国际键盘弹出时。
keyboardDidHide
当我隐藏国际键盘时不会触发。但是当标准键盘隐藏时触发。
我错过了什么吗?