【问题标题】:How to get event or notification of the input method changing?(IOS5.1)如何获取输入法更改的事件或通知?(IOS5.1)
【发布时间】:2012-08-19 15:54:06
【问题描述】:

(在 IOS 5.1 Xcode 4.3 中) 当用户点击按钮切换键盘输入法时,如何获取该事件并判断输入法的状态?

【问题讨论】:

    标签: iphone ios xcode uitextfield


    【解决方案1】:

    当输入法发生变化时,虽然键盘已经存在,但iOS会发送UIKeyboardDidShowNotification。您可以为自己注册此通知,例如:

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

    从我的角度来看,这实际上就是你所能做的! 不知道能不能直接检测到当前键盘的输入法! 或者可以看看下面的讨论:Detecting current iPhone input language!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-14
      相关资源
      最近更新 更多