title: UITableView jumps up after begin/endUpdates when using UITableViewAutomaticDimension
body: <p><strong>The problem</strong>: When I'm at the <strong>bottom</strong> of the <code>UITableView</code> (and only when at the bottom) and <code>tableView.beginUpdates()</code>/<code>tableView.endUpdates()</code> is called, the <code>UITableView</code> jumps up a little bit. I don't want it to do this.</p>
  
  <p><strong>Set Up:</strong> I have a <code>UITableView</code> with <code>UITableViewCells</code> that will all be different sizes, and I'm using <code>UITableViewAutomaticDimension</code> to size the cells. </p>
  
  <p><strong>Example:</strong>
  When I'm at the bottom of the <code>UITableView</code> and I select a cell, which subsequently calls <code>tableView.beginUpdates()</code>/<code>tableView.endUpdates()</code>, the <code>UITableView</code> scrolls/jumps up just a bit. </p>
  
  <p>Has anyone found a way to make it so there's no jumpiness after calling <code>tableView.beginUpdates()</code>/<code>tableView.endUpdates()</code> while at the end of the <code>UITableView</code>?</p>
  
  <p>For the time being I'm calculating all my <code>UITableViewCells</code> manually, I'd rather not do this though because I'd like to take advantage of <code>UITableViewAutomaticDimension</code>.</p>
  
  <p><strong>Code</strong>:</p>
  
  <p>Here's some code to display what goes on between <code>tableView.beginUpdates()</code>/<code>tableView.endUpdates()</code>:</p>
  
  <pre><code>    tableView.beginUpdates()
      cell!.setNeedsUpdateConstraints()
      cell!.updateConstraintsIfNeeded()
      cell!.setNeedsLayout()
      cell!.layoutIfNeeded()
      tableView.endUpdates()
  </code></pre>
  
  <p>My viewWillAppear:</p>
  
  <pre><code>public override func viewWillAppear(animated: Bool) {
      super.viewWillAppear(animated)
  
      self.tableView.estimatedRowHeight = 150.0
      self.tableView.rowHeight = UITableViewAutomaticDimension
  
  
      self.tableView.reloadData()
      //Bug in 8.0+ forces us to call three extra methods to get dynamic cell heights to work correctly...
      self.tableView.setNeedsLayout()
      self.tableView.layoutIfNeeded()
      self.tableView.reloadData()
  }
  </code></pre>
  
  <p>My heightForRow:</p>
  
  <pre><code>public override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -&gt; CGFloat {
  
      return UITableViewAutomaticDimension
  
  }
  </code></pre>
  
  <p><strong>Update</strong>: Removing <code>cell!.setNeedsUpdateConstraints()</code>, <code>cell!.updateConstraintsIfNeeded()</code>, <code>cell!.setNeedsLayout()</code>, and <code>cell!.layoutIfNeeded(</code>) from <code>tableView.beginUpdates()</code>/<code>tableView.endUpdates()</code> appears to stop the jumping, but then my cells do not resize...</p>
  
  <p><strong>Edit</strong>: This only occurs when at the <strong>bottom</strong> of the <code>UITableView</code>.</p>