0

I am pretty new to implement a custom collection view layout.

The layout contains cells with size of screen's width and height, like a photo gallery view. But when I select a cell the didSelectItemAtIndexPath:(NSIndexPath *)indexPath method runs and, opens a new view. But after closing that view I cannot select that cell again. Then after scrolling the collection view and I can see that the selected cell left a screenshot like thing in collection view. I could not understand what is the problem. I tried to invalidate the layout but nothing happened.

Hope you can help. Thanks in advance.

PS: I can provide code but I don't know what to provide. Ask, then I will share.

Update 1:

User *user = [_users objectAtIndex:indexPath.row];
ProfileViewController *pvc = [[ProfileViewController alloc] initWithUser:user];
[self presentViewController:pvc animated:true completion:nil];

Update 2:

I tried to add a button in UICollectionViewCell and tried to open the ProfileView on tap of this button and it works as expected with no problem. So, I guess problem seems in custom view layout.

Ali Ersöz
  • 15,860
  • 11
  • 50
  • 64

0 Answers0