Your code in hitTest isn't doing anything useful, so you might as well drop that. The property you're setting there is sticky, you can just set it on your scroll view and leave it set.
However, you DON'T want to set delaysContentTouches to YES, because it will only allow touch-up events to be detected in your subviews. That's why your web view can only receive simple taps, and not swipes.
Instead, set canCancelContentTouches=YES and delaysContentTouches=NO, then implement -touchesShouldCancelInContentView: on your scrollview. This is called the moment you do anything that could scroll the view. You should return YES if you want to allow the scroll to happen, and NO if you want to prevent it.
Since you have subviews inside your scrollview that want to receive swipes and things, you can simply set a BOOL flag (e.g., a global var or a property in your scrollview) to NO whenever one of those subviews receives any touch event, then return that flag from touchesShouldCancelInContentView:. When your subview is done ( receives -touchesEndedWithEvent: ) reset the flag to YES to reallow scrolling.
Either way, touchesShouldCancelInContentView: is the key.
__________________
|
| Why wait? ChordCalc 1.0.4 ... Hundreds sold worldwide !
|
Last edited by slahteine; 09-27-2009 at 04:22 PM.
|