UICollectionView selection/deselection methods not triggering

994 Views Asked by At

Basically I have a UIPageViewController which has multiple UICollectionView on each pages.

The problem is I can select/deselect on collectionViews inside the first page. But when I switch to second page, numberOfSections, numberOfItemsInSection, cellForItemAt are all called however the selection and deselection delegate methods are not called at all.

here is the link to the code: https://gist.github.com/anonymous/4eca4ff9f3e4423c01974609aeae5482

1

There are 1 best solutions below

2
On

I can't connect to your link. But you must make sure delegate of UICollectionView was set and check allowsMultipleSelection and allowsSelection is YES. You can reference links below: UICollectionView - didDeselectItemAtIndexPath not called if cell is selected iOS: UICollectionView cell selection not working