I've implemented non scrollable UICollectionView inside a UIscrollview. The size of the scrollview is 100x100 and that of collection view is 100x200; And the content size of the scroll view is 100x200.
My problem is, the didSelectItemAtIndexPath is not getting called when I touch some cells (the cells out of the 100x100 rect).
User interaction of the cells are enabled. All cells are touchable when I increment the scrollview height equal to the height of the collection view. Thanks in advance.
Swift 4.0
Register gesture in viewDidLoad function
My suggestion would be like this take a container whose size is same to collection view i.e 100x200 and add collection view on container and then add container on scroll view. This should fix this issue.
As i was having the similar issue as i was unable to scroll the collection view and select the collection view when making interaction on non visible part of scrollview.
Because scrollView overlapped on Cell... Best way is add tap Gesture on UIScrollView such like,
Add above code in cellForItemAtIndexPath method and Write gesture action method such like
Here in above gesture (action) method you can get indexPath as same as didSelectItemAtIndexPath.