title: Autoresize UICollectionView height to adjust to its content size
body: <p>I have a UICollectionView, a button that creates a new cell in collection view. And I want UICollectionView to adjust it's size according to it's content size (when there are one or two cells then UICollectionView is short, if there are a lot of cell UICollectionView is big enough).</p>
  
  <p>I know how to get content size: </p>
  
  <p><code>collectionView.collectionViewLayout.collectionViewContentSize</code></p>
  
  <p>But I have no idea where to use this value. I would appreciate if somebody help me to figure out how to make UICollectionView auto adjust it's height.</p>
  
  <p>UPD:
  I published on GitHub a demo project that describes the problem: <a href="https://github.com/avokin/PostViewer">https://github.com/avokin/PostViewer</a></p>