UICollectionView doesn't call delegate methods
-
12-12-2019 - |
Question
I've setup a UICollectionView
in a storyboard and connected the dataSource and delegate outlets. I've registered a cell via nib which I dequeue in the cellForItemAtIndexPath:
method.
All works perfectly expect that the delegate methods are never called. For example: When touching on a cell, I expect the didSelectItemAtIndexPath:
to be called.
I've double-checked the delegate of the collection view - it's assigned correctly.
Does anybody know the reason why the methods are not called?
Solution
It's completely my fault. I've added a transparent subview to the front which consumes the touches - a really bad mistake.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow