title: How can a superview interecept a touch sequence before any of its subviews?
body: <p>I have a view hierarchy that is layed out as follows:</p>
  
  <p>parentView</p>
  
  <pre><code> scrollView
  
      contentViewA
  
      containerView
  
           contentViewB
  
           contentViewC
  </code></pre>
  
  <p>I want contentViewB to respond to touches. Unfortunately scrollView makes this almost impossible because it tries to ingest the touches itself making touch response of contentViewB spotty.</p>
  
  <p>So, instead, I want to intercept all touches in the parentView, manipulate contentViewB directly, and  then pass the touches on to scrollView so it can do its thing.</p>
  
  <p>Can someone please show me the correct way to pull this off?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Cheers,
  Doug</p>
  
  <p>UPDATE:</p>
  
  <p>I did a bit more digging and found the property canCancelContentTouches which seems to work wonders. I'm using IB so I unchecked "Cancellable Content Touches" in IB - first tab of the Scroll View Attribute Inspector. Now, when I run the app, touches appear to be arriving at contentViewB reliably.</p>
  
  <p>Here's how the UIScrollView docs describe this property:</p>
  
  <p>Discussion
  If the value of this property is YES and a view in the content has begun tracking a finger touching it, and if the user drags the finger enough to initiate a scroll, the view receives a touchesCancelled:withEvent: message and the scroll view handles the touch as a scroll. If the value of this property is NO, the scroll view does not scroll regardless of finger movement once the content view starts tracking.</p>
  
  <p>Rather opaque huh? Anyway, it seems to work.</p>