title: How do I delete collection view cells along with this behaviour?
body: <p><a href="https://i.stack.imgur.com/LW7r1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LW7r1.png" alt="enter image description here"></a></p>
  
  <p>I am using the following code. This code just removes the collection view cell by fading them and moving the rest below it upwards. I am not sure how I should be able to do this animation. Help is much appreciated.</p>
  
  <pre><code>func remove()
      {
          totalItems -= 1
          data.remove(at: itemIdValue)
          collectionView.deleteItems(at: [indexPathValue])
      }
  
  
  func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
     let cell = collectionView.cellForItem(at: indexPath) as? InviteTasker1CellView
      cell.invitationSent()
      indexPathValue = indexPath
      itemIdValue = indexPath.item
      remove()
     }
  </code></pre>
  
  <p>Maybe it can be done better using Table view but I am not sure of a solution. </p>
  
  <p><strong>Please help me with understanding how you would do it? Thanks a lot.</strong></p>