Reputation: 19727
My UITableViewController
subclass has a few UITableViewCell
s containing UITextField
s. The textFields are subviews of the cells' contentViews.
The cells are automatically scrolled up when the keyboard would otherwise cover them. However tapping "Next" to stop editing textfield1 and start editing textfield2 does not properly scroll textfield2. In this case textfield2 is still obscured by the keyboard.
Any ideas why tapping "Next" doesn't scroll the tableView?
Upvotes: 0
Views: 430
Reputation: 30846
UITableViewController
automatically handles scrolling the table view in response to the UIKeyboard(Will|Did)(Show|Hide)
notifications. Since the keyboard is already on screen, the table view isn't notified that it needs to reposition it's content view. You're going to have to automatically reposition the view in response to the text fields changing first responder status.
Consider using -scrollToRowAtIndexPath:atScrollPosition:animated:
.
Upvotes: 3