Match App - Cards Changing Position

I am following YouTube free tutorials. My app is not crashing but cards just get displaced. When I select the first card of first row and last card of last row, the card changes positions. Every card comes back to its place after I scroll up and down.

The view after second card show up

Here is the GitHub link of my project Github Link

I’m still very new to this and haven’t completed the Match App tutorial, so I may not be on the right track. However, a couple of questions come to mind:

  1. Do you have an even number of cards?
  2. Is the size of your view an even multiple of the size of your cells?