更改iPad键盘高度的通知 [英] Notification for change of iPad keyboard height

查看:230
本文介绍了更改iPad键盘高度的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图在iPad键盘上显示一个UITextField。

I am trying to show a UITextField on top of the iPad keyboard.

当它显示通知时,我能够获得键盘的高度。

I was able to get the height of the keyboard when it was presented with the notification.

然而,在iPad中,通过更改键盘的语言输入 - >最有可能是日语,键盘的高度发生了变化,因为文本假设区域显示在键盘的顶部,导致我的UITextfield被该区域隐藏....

However, in iPad, by change the language input of the keyboard -> most likely to Japanese, the height of the keyboard changed because a text-hypothesis area was shown on top of the keyboard, that caused my UITextfield hidden by that area....

有谁知道如何获得高度更改通知或任何其他方式?

Does anybody know how can I get the height changed notification or any other way?

推荐答案

答案是当你切换语言时,每个人都会触发 UIKeyboardDidShowNotification 改变,所以你总是得到更新的高度。

The answer is that when you switch languages, the UIKeyboardDidShowNotification fires for each change, so you always get the updated height.

请参阅我的答案,了解如何设置对显示和隐藏的响应以及获得高度。

See my answer here on how to set up responses to the showing and hiding, and getting the height.

这篇关于更改iPad键盘高度的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆