检测国际键盘的出现和消失 [英] detect the appear and disappear of international keyboard
问题描述
当键盘出现时,有没有办法检测到它是一个国际键盘(普通键盘顶部有一个额外的功能区来显示国际字符)并且还能获得它的帧大小?我需要使用该信息向上移动(如果需要)键盘上方的视图。
When a keyboard appears, is there a way to detect that it's an international keyboard (with an extra ribbon on top of normal keyboard to show the international characters) and also get it's frame size? I need to use that info to move upward (if needed) the view above the keyboard.
推荐答案
查看这篇文章:< a href =http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-keeping-content-from-underneath-the-keyboard/ =nofollow noreferrer> http://mobile.tutsplus。 com / tutorials / iphone / ios-sdk-keeping-content-from-under-the-keyboard /
它解决了你的大部分问题。除了通知之外,文本视图将成为或退出第一响应者,它将调出或隐藏键盘视图。
It addresses most of your questions. In addition to notifications, text views will become or resign 'first responder' which will bring up or hide a keyboard view.
至于键盘是否显示国际字符,我不确定该怎么做。但是,如果您获得键盘的框架大小(如教程中所述),您可以相应地调整视图,假设这是您关心的问题。
As for whether or not the keyboard shows international characters, I'm not really sure how to do that. However, if you get the frame size of the keyboard (as described in the tutorial) you can adjust your view accordingly assuming that this was your concern.
UPDATE
另请查看: iOS 5中的键盘调整大小事件(中文键盘错误)?
这篇关于检测国际键盘的出现和消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!