I have a UICollectionView
, called parentCollectionView
, and it scrolls horizontally. Inside each parentCollectionView's cell, is another UICollectionView
, called childCollectionView
, which scrolls vertically. In addition, parentCollectionView
is set to paging (pagingEnabled = true).
Thus, you can scroll left/right to the next parentCollectionView
, and you can scroll up/down in the childCollectionView
.
There is an issue, however, regarding conflicting gestures. On the first horizontal swipe, the childCollectionView scrolling gesture is recognized. It fails to swipe horizontally, and doesnt scroll down in the child collectionview. But on the second swipe horizontally, it will page to the next horizontal cell as so.
How do I prevent the child collectionview from registering the first horizontal swipe? When I set isScrollEnabled = false
on the childCollectionView, it fixes the issue, but I still would like to scroll down in my child collectionViews.
Is this something that is accomplished via gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:
? Ive tried subclassing the scrollView the top answer in this stack overflow question, but was unsuccessful.
Cheers