简体   繁体   English

如何获取事件或输入法更改的通知?(IOS5.1)

[英]How to get event or notification of the input method changing?(IOS5.1)

(在IOS 5.1 Xcode 4.3中)当用户单击按钮切换键盘输入法时,如何进入此事件并确定输入法的状态?

When the input method changes, although the keyboard is already there, iOS will send the UIKeyboardDidShowNotification. 当输入法更改时,尽管键盘已经存在,iOS仍将发送UIKeyboardDidShowNotification。 You can register yourself for this notification like: 您可以为该通知注册自己,例如:

[[NSNotificationCenter defaultCenter] addObserver:self 
                                     selector:@selector(keyboardDidShow:) 
                                         name:UIKeyboardDidShowNotification
                                       object:nil];

Thats actually all you can do from my point of view! 从我的角度来看,这实际上就是您所能做的! I'm not sure if it's possible to detect the current input method of the keyboard directly! 我不确定是否可以直接检测键盘的当前输入法! Or maybte take a look at the following discussion: Detecting current iPhone input language ! 或也许看一下下面的讨论: 检测当前的iPhone输入语言

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM