You must subclass UIScrollView and overwrite the following method:
-(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
If this method returns NO, scrollview will be transparent for touch events.
Since you want the scrollview to be “transparent” to touch events only if the touch is in the transparent area of your scrollview, your implementation should look like this:
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { return ![self isPointInsideATransparentRegion:point];
tanzolone
source share