title: Resize UICollectionView after view transition
body: <p>I've built detail view in Interface Builder showing informations and photos about some object. Because lenght of informations and number of photos will vary, all is nested in <code>UIScrollView</code>.</p>
  
  <p>Photos are shown in <code>UICollectionView</code>, but I need to always show all contained photos, so I disabled scrolling and dynamically changing <code>Height</code> constraint of <code>UICollectionView</code> by this function (called when finishing rendering cells):</p>
  
  <pre><code>func resizePhotosCollectionView() {
      photosCollectionViewHeightConstraint.constant = photosCollectionView.collectionViewLayout.collectionViewContentSize()
  }
  </code></pre>
  
  <p>It works great until this <code>UICollectionView</code> needs resize (typically by device orientation change). I am trying to use <code>UIViewControllerTransitionCoordinator</code> in function:</p>
  
  <pre><code>override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
      coordinator.animateAlongsideTransition(nil) { context in
          self.resizePhotosCollectionView()
      }
      super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
  }
  </code></pre>
  
  <p>but result is jerky because <code>Height</code> constraint changed after transition is complete.</p>
  
  <p>Is there any way how to automatically resize <code>UICollectionView</code> after view transition? If not, how to animate <code>Height</code> constraint change during transition?</p>
  
  <p>Using Xcode 6.1 for target IOS 8.</p>