Skip to content

Instantly share code, notes, and snippets.

@dhl613
Created March 9, 2019 03:20
Show Gist options
  • Save dhl613/102424fd4be393e230f78a0b2abd6309 to your computer and use it in GitHub Desktop.
Save dhl613/102424fd4be393e230f78a0b2abd6309 to your computer and use it in GitHub Desktop.
解决导航栏按钮(返回)响应区域过大问题
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
if ([self pointInside:point withEvent:event]) {
self.userInteractionEnabled = YES;
} else {
self.userInteractionEnabled = NO;
}
return [super hitTest:point withEvent:event];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment