Skip to content

Instantly share code, notes, and snippets.

@codesburner
Forked from Carigna/disable zoom
Created April 4, 2011 10:30
Show Gist options
  • Save codesburner/901440 to your computer and use it in GitHub Desktop.
Save codesburner/901440 to your computer and use it in GitHub Desktop.
-(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