How do I adjust my content views so that they are

2019-09-02 11:25发布

When the keyboard slides up in my iPhone application, it obscures a large portion of the screen. How do I adjust my views so that they are not hidden under the keyboard?

2条回答
Ridiculous、
2楼-- · 2019-09-02 12:02

You'll find nice code for that here. Just go to the section called : Moving Content That Is Located Under the Keyboard

You can use and adapt what the documentation said to move your view when the keyboard is visible.

Hope this helps !

查看更多
你好瞎i
3楼-- · 2019-09-02 12:13

I usually move up my whole UIView so you can see both keyboard and textfield

查看更多
登录 后发表回答