title: Force UITableView to scroll to top?
body: <p>How would you go about forcing a UITableViewCell to scroll to the top if the tableview contains less than 10 or so cells? I support editing of Managed Object Contexts within my tableView cells while the tableview is in editing mode. Needless to say, if a cell is at the bottom of the tableview, it gets blocked by the keyboard when a user goes to edit the title or location of an event. I tried a solution like:</p>
  
  <pre><code>-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath
  {
      [tableView deselectRowAtIndexPath:indexPath animated:NO];
  
      if(_selectedIndex == indexPath.row){
          _selectedIndex = -1;
          [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
                           withRowAnimation:UITableViewRowAnimationFade];
          return;
      }
  
      if(_selectedIndex &gt;= 0){
          NSIndexPath *previous = [NSIndexPath indexPathForRow:_selectedIndex inSection:0];
          _selectedIndex = indexPath.row;
          [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:previous]
                           withRowAnimation:UITableViewRowAnimationFade];
      }
  
      _selectedIndex = indexPath.row;
      [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
                       withRowAnimation:UITableViewRowAnimationFade];
  
      [tableView setContentOffset:CGPointMake(0, [tableView rowHeight]*indexPath.row) animated:YES];
  }
  </code></pre>
  
  <p>But this does not keep the tableview at the contentOffset. it will snap to the top and then snap back</p>