How to send touch events to another view?

In my view controller I have a collection view and over that there is a scroll view (covering the whole main view). The collection view acts as a sort of "header" to the scroll view and has images in it. The scrollview has a clear view at the top the same size as the collection view to make the collection view visible through the scrollview - collectionViewTouchView. This is done so I can create a parallax effect when scrolling.

The problem is that I can't swipe on the collection view because the scrollview is over it. Can I somehow record touch events on collectionViewTouchView and then pass it directly to the collection view?

Notification could be a solution:

  • catch the touch event position.
  • send a notification to the view Controller.
  • have the view subscribe to this notification (addObserver).
  • use the received notification to use by the collectionView as a touch inside.
How to send touch events to another view?
 
 
Q