Matchapp flipup logic error

Hello codecrew,
I have problem in matchapp code at leason 26.
I write flipUp function. When i run the program, when i clicked the card, nothing flipup.
But when i clicked the next card, before card just flipup.
I cannot found the error, i check the code look as same with the tutorial.

@agus_winarno

Hi Agus,

Can you post screenshots of your code so that we can see what you have tried to do.

This is my code screenshoots.

@agus_winarno

Hi Agus,

The last collectionView method in the attached screenshot is didDeselectItemAt and is the wrong one. You should be able to change that to didSelectItemAt and that should solve the problem.

oke.
it solved perfectly.
thanks you @Chris_Parker .

1 Like