mahboudz
mahboudz

Reputation: 39376

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?

Upvotes: 5

Views: 1282

Answers (1)

Amiel Martin
Amiel Martin

Reputation: 4824

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

[super viewWillAppear:animated];

See: UITableViewController not scrolling view when keyboard appears

Upvotes: 9

Related Questions