问题
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?
回答1:
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 !
回答2:
I usually move up my whole UIView so you can see both keyboard and textfield
来源:https://stackoverflow.com/questions/3564420/how-do-i-adjust-my-content-views-so-that-they-are-not-obscured-by-the-keyboard