I've got a UICollectionView
in my UIViewController
and I want it to respond to gestures inside AND outside of the UICollectionView
. By default the UICollectionView
only responds to the gestures inside its own view
but how can I make it respond to swipes outside of its view
?
Thanks.
I wrote a view subclass that accomplishes just this:
In interface builder, set the subview of the containing view to TouchForwardingView, then assign the collection view to the forwardingTarget property.
Steven B's answer for with Swift 4 :)
Swift version of Nailer's anwer, this will forward all gestures done on the viewcontroller to the collectionview