Possible Duplicate:
How to programatically check whether a keyboard is present in iphone app?
Detect if UIKeyBoard is Showing
有没有办法以编程方式检查iPhone的键盘是否在屏幕上?
最佳答案
基本上,您想添加一个NSNotificationCenter
观察者:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow) name:UIKeyboardDidShowNotification object:nil];