Created
January 3, 2019 21:49
-
-
Save yarneo/065d06dfbd011e6167125c1646742c5c to your computer and use it in GitHub Desktop.
This file contains 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 { | |
if (self.layer.shapeGenerator) { | |
if (CGPathContainsPoint(self.layer.shapeLayer.path, nil, point, true)) { | |
return self; | |
} else { | |
return nil; | |
} | |
} | |
return [super hitTest:point withEvent:event]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment