检测国际键盘的出现和消失
当键盘出现时,有没有办法检测它是国际键盘(普通键盘顶部有一条额外的丝带以显示国际字符)并获取它的框架大小?我需要使用该信息向上移动(如果需要)键盘上方的视图。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看这篇文章:http: //mobile.tutsplus.com/tutorials/iphone/ios-sdk-keeping-content-from-underneath-the-keyboard/
它解决了您的大部分问题。除了通知之外,文本视图将成为或放弃“第一响应者”,这将调出或隐藏键盘视图。
至于键盘是否显示国际字符,我不太确定该怎么做。但是,如果您获得键盘的框架大小(如教程中所述),您可以相应地调整您的视图,假设这是您所关心的。
更新
另请查看:键盘调整大小iOS 5 中的事件(中文键盘错误)?
Check out this article: http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-keeping-content-from-underneath-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
Also check out: Keyboard resize event in iOS 5 (Chinese keyboard bug)?