views:

72

answers:

1

Harrr pirates!

I'm trying to make a data entry screen using a TableViewController. It contains a grouped table view with two sections, each with a few (2 and 4) rows with a UITextField inside them. When any of the UITextFields become first responder they scroll into view automatically. Great, you would say, but I want to scroll the whole section into view, not just the row containing the UITextField that became first responder. I don't allow the user to scroll the UITableView by hand and I know to what position it should scroll to display correctly. However, I can't get my TableViewController to stop automatically scrolling the UITextField into view for me.

Searching StackOverflow I can find a lot of questions about how to resize the UITableView when the keyboard appears, but this doesn't stop the automatic scrolling.

Any suggestions? Your help would be much appreciated!

A: 

TableView is basically an extension of scrollView therefore if you want to do the scroll yourself you should use the scrollview API.

Set the contectSize property to the size of the screen without the keyboard and the contentOffset to the location on the table you want to scroll to

Guy Ephraim