Is it possible to detect the current keyboard input method on the iPhone?

前端 未结 3 1924
一生所求
一生所求 2020-12-18 07:18

I want to know the current input method the user is typing in such as En (english), German, Chinese, etc... Maybe keyboard type is what I am after, but documentation seems

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-18 07:49

    In iOS4.2 there is a new class UITextInputMode that is exactly what you want. (Oops, this is still under NDA. If you have no iOS dev center account please don't read this answer ;) )

    You can query current mode (English, French, Japanese, etc) or get notifications when it changes (the keyboard language changes)

    UITextInputMode documentation (requires log in)

提交回复
热议问题