Scroll UITableViewCell above keyboard for small tableview
Posted
by JK
on Stack Overflow
See other posts from Stack Overflow
or by JK
Published on 2010-05-25T10:15:23Z
Indexed on
2010/05/25
12:01 UTC
Read the original article
Hit count: 362
iphone
|cocoa-touch
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
© Stack Overflow or respective owner