Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Do you have enough dummy contacts added to test the scrolling? It seems that only when your tableView is of a certain size the iPhone finds the inputus to scroll.</p> <p>This is the code that works for me in my project. I use a previous button and therefore I scroll the tableview a little bit further down that it usually would go with UITABLEVIEWSCROLLPOSITION. (my previous button won't work if it can't "see" the previous cell.</p> <p>Ignore some of the custom method calls.</p> <pre><code>- (void)textFieldDidBeginEditing:(UITextField *)textField { //Show the navButtons [self navButtonAnimation]; DetailsStandardCell *cell = (DetailsStandardCell *)textField.superview.superview.superview; self.parentController.lastCell = cell; //Code to scroll the tableview to the previous indexpath so the previous button will work. NOTE previous button only works if its target table cell is visible. NSUInteger row = cell.cellPath.row; NSUInteger section = cell.cellPath.section; NSIndexPath *previousIndexPath = nil; if (cell.cellPath.row == 0 &amp;&amp; cell.cellPath.section != 0) //take selection back to last row of previous section { NSUInteger previousIndex[] = {section -1, ([[self.sections objectForKey:[NSNumber numberWithInt:section - 1]]count] -1)}; previousIndexPath = [[NSIndexPath alloc] initWithIndexes:previousIndex length:2]; } else if (cell.cellPath.row != 0 &amp;&amp; cell.cellPath.section != 0) { NSUInteger previousIndex[] = {section, row - 1}; previousIndexPath = [[NSIndexPath alloc] initWithIndexes:previousIndex length:2]; } [self.theTableView scrollToRowAtIndexPath: cell.cellPath.section == 0 ? cell.cellPath : previousIndexPath atScrollPosition:UITableViewScrollPositionTop animated:YES]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload