检测iPad键盘隐藏按钮 [英] detect iPad keyboard Hiding button

查看:101
本文介绍了检测iPad键盘隐藏按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨有没有办法检测iPad键盘隐藏按钮?我的意思是当用户按下此按钮时:

Hi is there any way to detect iPad keyboard hiding button ? i mean when user press this button :

会发生什么事情!

推荐答案

我不是确定你想要完成什么,但也许这可以帮助你:注册 NSNotificationCenter 以接收UIKeyboardWillHideNotification和/或UIKeyboardDidHideNotification。

I'm not sure what you want to accomplish, but maybe this can help you: Register with NSNotificationCenter to receive the UIKeyboardWillHideNotification and/or UIKeyboardDidHideNotification.

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(myKeyboardWillHideHandler:)
                                             name:UIKeyboardWillHideNotification
                                           object:nil];

...

- (void) myKeyboardWillHideHandler:(NSNotification *)notification {
    NSLog(@"Keyboard wants to hide. What a coward.");
}

这篇关于检测iPad键盘隐藏按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆