Reputation: 2563
I have a tableview with custom cells. Each cell has a UITextfield. When the last cell's textfield is clicked, the keyboard pops up and covers it and the table view won't scroll up any further. Is there a property of UITableview that can be set so that the last cell can scroll to half way up the screen?
Thanks in advance
Upvotes: 0
Views: 1112
Reputation: 4296
see Making a UITableView scroll when text field is selected for a list of solution..
Also basing your view controller from UITableViewController (since you say its a table) will provide all this functionality automatically!
Upvotes: 0
Reputation: 3947
There are a two ways to approach this (that I can think about off the top of my head):
tableFooterView
property of UITableView
to set an arbitrary, empty view to be about half the size of your table.Both of these approaches will accomplish roughly the same thing, but using the tableFooterView
property is probably your best bet.
Upvotes: 2