title: Zoom in UICollectionViewCell on "didSelectItemAt"
body: <p>I need to implement an animation which looks like the attached gif.</p>
  
  <p>When you tap on a cell, it should zoom in and accordingly the spacing between cells should maintain(Cell shouldn't overlap).When you select another cell the currently selected cell animate to original size and the newly selected cell zoom in the same time.</p>
  
  <p>Currently, in when the user selects the cell I'm calling reload for UICollectionView and in <strong>cellForItemAtIndex</strong> I have kept some delay to animate the image using "CGAffineTransform.scale".</p>
  
  <p>But with this approach I'm not getting the desired animation, there is a noticeable flickering.</p>
  
  <pre><code>func animateTheCellOnTapping(cell:RatingFeedbackCell, indexPath:IndexPath) {
      cell.overlayView.transform = CGAffineTransform.identity
      UIView.animate(withDuration: 0.2, animations: {
          if indexPath == self.selectedIndex {
              cell.imagesContainerView.transform = CGAffineTransform(scaleX: 1.1, y: 1.1)
          }
      })
      if indexPath != selectedIndex {
          cell.imagesContainerView.transform = CGAffineTransform.identity
      }
  }
  </code></pre>
  
  <p>Is there any other way to do this?</p>
  
  <p><a href="https://i.stack.imgur.com/3Sm53.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3Sm53.gif" alt="Sample Animation"></a></p>
  
  <p><strong>Note</strong> </p>
  
  <p>The above animation I have done using UIScrollView, but I wanted to do the same using UICollectionView.</p>