-
-
Save codesburner/901440 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { | |
| NSSet *touches = [event allTouches]; | |
| BOOL forwardToSuper = YES; | |
| for (UITouch *touch in touches) { | |
| if ([touch tapCount] >= 2) { | |
| // prevent this | |
| forwardToSuper = NO; | |
| } | |
| } | |
| if (forwardToSuper){ | |
| //return self.superview; | |
| return [super hitTest:point withEvent:event]; | |
| } | |
| else { | |
| // Return the superview as the hit and prevent | |
| // UIWebView receiving double or more taps | |
| return self.superview; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment