【发布时间】:2012-08-19 15:54:06
【问题描述】:
(在 IOS 5.1 Xcode 4.3 中) 当用户点击按钮切换键盘输入法时,如何获取该事件并判断输入法的状态?
【问题讨论】:
标签: iphone ios xcode uitextfield
(在 IOS 5.1 Xcode 4.3 中) 当用户点击按钮切换键盘输入法时,如何获取该事件并判断输入法的状态?
【问题讨论】:
标签: iphone ios xcode uitextfield
当输入法发生变化时,虽然键盘已经存在,但iOS会发送UIKeyboardDidShowNotification。您可以为自己注册此通知,例如:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidShow:)
name:UIKeyboardDidShowNotification
object:nil];
从我的角度来看,这实际上就是你所能做的! 不知道能不能直接检测到当前键盘的输入法! 或者可以看看下面的讨论:Detecting current iPhone input language!
【讨论】: