title: UICollectionVIew zoom of a single UIImageView in a cell
body: <p>How to zoom a UIImageView that takes up a fullscreen cell in a UICollectionView image?</p>
  
  <p>Since UICollectionView is a subclass of UIScrollView it should be fairly simple..</p>
  
  <p>I tried to set minimumZoomScale, maximumZoomScale and viewForZoomingInScrollView: but the result is a mess.</p>
  
  <p>In viewForZoomingInScrollView i returned the UIImageView, but that does not work.</p>
  
  <p>Now i'm trying to return the visualized cell, but on zooming the image changes to the first cell. </p>
  
  <p>it zooms but messes up the collection view.</p>
  
  <pre><code>func viewForZoomingInScrollView(scrollView: UIScrollView) -&gt; UIView? {
  
      if let selectedIndex = self.collectionView.indexPathsForVisibleItems().last as? NSIndexPath
      {
          let cell = self.collectionView.cellForItemAtIndexPath(selectedIndex)
          return cell
      }
      return nil
  }
  </code></pre>
  
  <p>So, what i need to do to zoom the image (cell) currently on screen?</p>
  
  <p>Moreover pagingEnabled goes off automatically (that's good for panning the zoomed image, but not for scrolling the collection)</p>