title: self-sizing collection view cells using swift not working
body: <p>I'm trying to create a collection view with cells that can autosize.  previously i had used sizeForItemAtIndexPath but could not get the cell height exactly right for a textView with attributedString.  I've decided to abandon that approach and use the auto-sizing feature.  I have found some information here but mostly with objective-C.  I am only familiar with Swift. Even so, I have picked through it and it is still not working.  </p>
  
  <p>What I have done so far is to include the following code in my viewDidLoad:</p>
  
  <pre><code>if let flowLayout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout {
      flowLayout.estimatedItemSize = CGSize(
          width: self.view.frame.size.width, height: 100)
  }
  </code></pre>
  
  <p>the cell width is showing correctly however all the cell heights are stuck at 100 regardless of the content.  </p>
  
  <p>Is there something else I need to do to allow the autosizing to kick in?  I'm pretty sure my storyboard constraints are set up correctly.</p>