views:

224

answers:

1

I have a table view that is placed in front of a scroll view. When the user drags vertically I want the table to scroll up and down and when they drag horizontally I want the scroll view behind to scroll its image.

I understand how to check the touches using the UIResponder delegate methods to sense whether the user is scrolling horizontal or vertically.

I am looking for advice on how to hand off the touch handling to the scroll view in the horizontal scrolling case. How does one get the events to stop coming to the table view and to the scroll view (which is nextResponder)?

+1  A: 

I think you want "Responder Objects and the Responder Chain"

There's sample code on how to forward the event to your next responder. You don't stop taking the events. You just pass them along the chain as appropriate. Obviously this means you will need to maintain state in your first responder.

Rob Napier