title: UIScrollView scrolling using a gesture on the overlaid view
body: <p>Consider the view hierarchy in the figure below:</p>
  
  <p><img src="https://i.stack.imgur.com/cBXuR.png" alt="enter image description here"></p>
  
  <p><code>OverlayView</code> is simply a control view that has some custom controls on it. It also has multiple tap/swipe gesture recognizers. The <code>ScrollView</code> is the scroll view that needs to be scrolled based on the interactions with <code>OverlayView</code>. The <code>OverlayView</code> has the same frame as that of the <code>ScrollView</code>.</p>
  
  <p>I need a way to add some kind of swipe/pan gesture setup configured for the <code>OverlayView</code> such that I can scroll the underlying <code>ScrollView</code> as if I am interacting with it.</p>
  
  <p>There seems to be two different approaches:</p>
  
  <ol>
  <li><p>Recognize the gesture on the <code>OverlayView</code> and pass it to <code>ScrollView</code>. But I am unsure what gestures to use and how to make <code>ScrollView</code> interact with them.</p></li>
  <li><p>Ignore all the touches on the <code>OverlayView</code> unless they are on the controls. Pass these touches to the underlying <code>ScrollView</code>. This seems like the easier approach; but I am not sure how to proceed with this either. </p></li>
  </ol>
  
  <p>Does anybody have any kind of sample code for some project or a similar exercise they worked on before? If not, any pointers whatsoever?</p>