title: How to allow an off screen UITableViewCell push down content offset?
body: <p>I have a UITableView, which contains a bunch of cells.</p>
  
  <p>If a user clicks on the second cell, the first cell is supposed to animate and expand its height significantly and push all of the other cells down, leaving the user's scroll position in the same place. My code is working 100% correctly when both cells are on the screen. The contentSize of the UITableView grows significantly, and the contentOffset does not change.</p>
  
  <p>But if the user scrolls down so that only the second cell is visible, when they tap it, the first cell expands off screen and nothing happens for the user.</p>
  
  <p>The contentSize of the UITableView does not change, nor does the contentOffset. Once the user scrolls up slightly, and sees the bottom of the expanded cell, the contentSize and the contentOffset update to reflect the fact that the first cell is indeed much bigger (but nothing changes from the user's perspective)</p>
  
  <p>Calling <code>heightForRowAtIndexPath</code> for the the index path of the cell before and after expanding returns the expected values. </p>
  
  <p>My code has a lot going on, but the main piece that is supposed to be animating the expansion is here:</p>
  
  <pre><code>UIView animateWithDuration:0.3
   animations:^{
     performSelectorOnMainThread(@selector(updateItemHeights:), withObject: nil, waitUntilDone: YES)
   }
   completion:^(BOOL finished){}]
  </code></pre>
  
  <p>And the implementation of of updateItemHeights:</p>
  
  <pre><code>   beginUpdates
     endUpdates
     self.contentSize = sizeThatFits([contentSize.width, CGFLOAT_MAX])
  </code></pre>
  
  <p>It seems like iOS is trying to keep the user in their current context by allowing the cells above to expand.</p>
  
  <p>How do I get an off screen cell to push the other cells down?</p>