tags:

views:

66

answers:

1

I subclassed uiscrollview and overrode the touch began method to pass touch events to a button object behind the scroll view(the scroll view is transparent). For some reason, only if user interaction of the scrollview is disabled does the event get passed through. Does anyone know how to pass events up the responder chain with scroll view without disabling the user interaction?

Thanks, David

+1  A: 

Yeah—override the scroll view's -hitTest:withEvent: method. You can check the position of the touch that way and pass it through to another view, e.g. your button. There're some notes on how to do that in the documentation here.

Noah Witherspoon
Thanks! as usal i spent a long time going down the wrong road...I just overrode PointsInside of the object i don't want the touch to get accepted by. It worked and the great thing is, I can override this way for any type of pass through touching! thanks again.
David Hsu