Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any reason a UITableViewController doesn't scroll the active textfield up when the keyboard appears?

I have a UITableViewController that contains tables with cells that have a UITextField. When the keyboard comes up to add or edit text in those textfields, those fields must move up so they are not obscured by the keyboard. This should be handled automatically by the UITableViewController:

from Apple:

Note: A table view controller supports inline editing of table view rows; if, for example, rows have embedded text fields in editing mode, it scrolls the row being edited above the virtual keyboard that is displayed.

Could the problem be that I am using a SplitViewController, with the UITableViewController on the right side (the larger split) and another view on the left split.

What am I missing? Are there only certain situations in which the UITableViewController will handle this and not others?

like image 356
mahboudz Avatar asked Dec 14 '12 11:12

mahboudz


1 Answers

I had this same issue. In my case I had forgotten to call:

[super viewWillAppear:animated];

See: UITableViewController not scrolling view when keyboard appears

like image 131
Amiel Martin Avatar answered Nov 13 '22 08:11

Amiel Martin