views:

44

answers:

1

I have a tableview which is added to a UIViewController as the tableview only fills the bottom 3/4 of the screen.The rows contain editable UITextFields. When a field is tapped, the keyboard appears but the table does not scroll upwards as would normally be the case. Consequently, the keyboard obscures the field being edited. I have tried calling

[tableView scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated]

but this has no effect if the table contains only a few rows. How can I get the table to scroll a specific cell above the keyboard? Thank you

A: 

MY final workaround is to set the contentoffset of the tableview by the y origin of the cell containing the textfield - 100;

Run Loop