title: UITableView with dynamic cell heights jumping when scrolling up after reloading cell
body: <p>I have a table view with the potential for each cell to have its own height, thus isn't suitable to use <code>rowHeight</code>. Instead, right now I'm using <code>let indexSet = NSIndexSet(index: 10)</code>, and <code>self.tableView.estimatedRowHeight = 75</code>. This means that it calls the <code>sizeThatFits</code> function on the cell, to determine its' height. This all works well.</p>
  
  <p>The problem is then when you reload a cell that's onscreen. Scrolling down to show cell 10, for example, then reloading cell 10, works fine. But when you begin to scroll back up, past the cells you've already seen, it reverts to the estimatedRowHeight for each cell, completely disregarding <code>sizeThatFits</code>, and so jumps around as you scroll. It'd be impossible for me to give an accurate or 'good enough' estimatedRowHeight so that this jumping wouldn't be noticeable, as my cells will be able to display either a line of text, or a full image - a big difference in size.</p>
  
  <p>I've shown this effect here:</p>
  
  <p><a href="https://vid.me/edgW">https://vid.me/edgW</a></p>
  
  <p>I've made many different attempts at this, using a mixture of heightForRowAtIndexPath, estimatedHeightForRowAtIndexPath.. etc.. I've tried various pieces of advice on StackOverflow. Nothing seems to work.</p>
  
  <p>I've attached a very simple sample project, where you can try it for yourself:</p>
  
  <p><a href="https://www.dropbox.com/s/8f1rvkx9k23q6c1/tableviewtest.zip?dl=0">https://www.dropbox.com/s/8f1rvkx9k23q6c1/tableviewtest.zip?dl=0</a></p>
  
  <ol>
  <li>Run the project.</li>
  <li>Scroll until cell 10 is in view.</li>
  <li>Wait up to 5 seconds for the cell to reload (it becomes purple).</li>
  <li>Scroll up.</li>
  </ol>
  
  <p>Worth noting - this does <em>not</em> happen if the cell is not in view when it's reloaded. If it's either above <em>or</em> below the current scroll point, everything works as expected.</p>