键盘是否在屏幕上

键盘是否在屏幕上

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];

08-06 04:03