title: UICollectionView: dynamic cell heights with UIStackView
body: <p>I have a storyboard, consisting of a single <code>UICollectionView</code> with multiple cells, each of varying height. The first cell takes the height from the <code>UICollectionViewDelegateFlowLayout</code>:</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView,
          layout collectionViewLayout: UICollectionViewLayout,
          sizeForItemAtIndexPath indexPath: NSIndexPath) -&gt; CGSize
  </code></pre>
  
  <p>.. but I'd like the second cell to be shorter.
  I've placed two <code>UIStackViews</code> inside a "master" <code>UIStackView</code> inside the cell, and each of the inner <code>UIStackViews</code> has one or more labels, like this:</p>
  
  <pre><code>cell
  --&gt; stackView (master)
      --&gt; stackView (1)
          --&gt; label
      --&gt; stackView (2)
          --&gt; label
          --&gt; label (etc)
  </code></pre>
  
  <p>.. in the hope that the <code>UIStackView</code> would make the cell height dynamic, but it doesn't. It takes the height from the <code>UICollectionViewDelegateFlowLayout</code> as before.</p>
  
  <p>How should I be doing this?</p>