title: Where to determine the height of a dynamically sized UICollectionViewCell?
body: <p>I'm using UICollectionViewFlowLayout. My cells contain UILabels that differ in height (number of lines).</p>
  
  <p>It seems that the best way to get the cell height would be in the subclass of <code>UICollectionViewCell</code>, because that is where I set the layout and have access to intrinsic size of my views, BUT:</p>
  
  <p><code>collectionView: layout: sizeForItemAtIndexPath:</code> is called before the <code>collectionView: cellForItemAtIndexPath:</code> delegate method, which means that I need to know the cell height before I have the actual layout of the cell.</p>
  
  <p>Everything I came up with so far seems too complicated, like starting with fixed cell height, referencing actual height after labels in the cell load and reloading the data again with correct height. Is there a better way to do this?</p>