简体   繁体   English

获取键盘尺寸而不显示它

[英]Get Keyboard size without showing it

I can get the keyboard's dimension after its displayed from the notification, BUT I would like to position my textFields so that I don't have to scroll them when the keyboard appears. 我可以从通知中获得键盘显示后的尺寸,但是我想放置自己的textField,以便在键盘出现时不必滚动它们。 To achieve this I should know the keyboard's dimension BEFORE it's even displayed. 为此,我应该在显示键盘之前就知道键盘的尺寸。

Is this possible on iOS? 在iOS上可以吗?

You can use a class where this all things are handled by default. 您可以使用默认情况下处理所有事情的类。 Just you have to use scroll view for this. 只是您必须为此使用滚动视图。

TPKeyboardAvoidingScrollView TPKeyboardAvoidingScrollView

See if it's useful and fulfill your requirement. 查看它是否有用并满足您的要求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM