Reputation: 1687
I'm still getting familiar with iOS and the use of constraints
. Initally had my layout setup with some constraints
. But I ran into an issue. When entering text, my text fields
are covered by the keyboard. I found some Apple docs: Doc One, Doc Two stating I should use a scrollview
in this case. It sounded easy enough but every time I put the content in the scrollview
things go nuts. I've tried adjust my constraints
in several ways, but nothing seems to help.
Anyone have any insight on what I'm missing? Thank you
Upvotes: 1
Views: 1567
Reputation: 385998
If you use a UITableView
with static cells and make your view controller a subclass of `UITableViewController, you don't need to worry about the keyboard. The table view controller takes care of keeping the focussed text field visible above the keyboard:
I wrote no code for that demo. It's all done in the storyboard. Here's the storyboard outline:
Upvotes: 2