title: Animate UICollectionView cell size change and reposition surrounding cells
body: <p><img src="https://i.stack.imgur.com/LfUMS.png" alt="enter image description here"></p>
  
  <p><strong>Goal:</strong> </p>
  
  <p>To animate the change of a cell's height and reposition surrounding cells.</p>
  
  <p><strong>Scenario:</strong></p>
  
  <p>Some cells in a collection view load remote images. Initially, those cells are sized statically and an activity indicator is shown. After an image is loaded, it is added to its cell and the cell's height is changed to fit the photo.</p>
  
  <p><strong>Notes:</strong></p>
  
  <p>I am animating the cell's frame change with <code>animateWithDuration</code>. This works fine, except an increased cell size has it overlapping the cells below. I've blindly tried calling <code>collectionView.collectionViewLayout invalidateLayout</code> after resizing the target cell and updating the size returned by <code>sizeForItemAtIndexPath</code> with no success.</p>
  
  <p>Any suggestions? Thank you!</p>
  
  <p><strong>Sample Code:</strong></p>
  
  <p><a href="https://github.com/juzzin/ResizeUICollectionViewCell/blob/master/ResizeUICollectionViewCell/FLOViewController.m" rel="noreferrer">https://github.com/juzzin/ResizeUICollectionViewCell/blob/master/ResizeUICollectionViewCell/FLOViewController.m</a></p>
  
  <p><img src="https://i.stack.imgur.com/9GwpQ.png" alt="enter image description here"></p>