I have a UITableView
with a few UITableViewCell
s. Each cell contains a UITextfield
. Tapping the textFields causes the keyboard to display. Unfortunately the keyboard covers some of the cells that are lower on the iPhone's screen.
What's the easiest way to scroll the tableView up when the keyboard is displayed?
I've experimented with the contentOffset
. This works for actually scrolling the tableView. However I'm having trouble determining which cell is "active" (has a textField that's currently the firstResponder). My app supports both portrait and landscape orientation so the tableView sometimes needs to be scrolled when the device rotates.