Making a UITableView scroll when text field is selected

After a lot of trial and error, I’m giving up and asking the question. I’ve seen a lot of people with similar problems but can’t get all the answers to work right.

I have a UITableView which is composed of custom cells. The cells are made of 5 text fields next to each other (sort of like a grid).

When I try to scroll and edit the cells at the bottom of the UITableView, I can’t manage to get my cells properly positioned above the keyboard.

I have seen many answers talking about changing view sizes,etc… but none of them has worked nicely so far.

Could anybody clarify the “right” way to do this with a concrete code example?

45 Answers
45

If you use UITableViewController instead of UIViewController, it will automatically do so.

Leave a Comment