title: Set UITableView contentOffset, then drag, view offset jumps to new position
body: <p>I have a <code>UITableView</code> that is slightly larger than <code>self.view</code>. I have a <code>UITextField</code> at the bottom of the view, and I use the delegate method <code>– textFieldDidBeginEditing:</code> to move the view up when the text field starts editing.</p>
  
  <p>This works fine, but if I attempt to scroll the view while the <code>UITextField</code> is being edited (and the content is already offset) then the content jerks to the bottom 'appropriate' position for the view. Put another way, the <code>contentOffset.y</code> I set is changed to be equal to the size of the content view (as you would expect for normal behaviour).</p>
  
  <p>Any ideas how to over-ride this behaviour while editing?</p>
  
  <pre><code>- (void)textFieldDidBeginEditing:(UITextField *)textField
  {
      // Scroll to the currently editing text field
      [self scrollViewToTextField:textField];
  
  }
  
  - (void)scrollViewToTextField:(id)textField
  {
      // Set the current _scrollOffset, so we can return the user after editing
      _scrollOffsetY = self.tableView.contentOffset.y;
  
      // Get a pointer to the text field's cell
      UITableViewCell *theTextFieldCell = (UITableViewCell *)[textField superview];
  
      // Get the text fields location
      CGPoint point = [theTextFieldCell convertPoint:theTextFieldCell.frame.origin toView:self.tableView];
  
      // Scroll to cell
      [self.tableView setContentOffset:CGPointMake(0, point.y - 12) animated: YES];
  }
  </code></pre>