Created
December 4, 2013 13:19
-
-
Save elpsk/7787317 to your computer and use it in GitHub Desktop.
Pass through view
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
@interface APPassThroughUIView : UIView | |
@end | |
@implementation APPassThroughUIView | |
- (BOOL) pointInside:(CGPoint)point withEvent:(UIEvent *)event | |
{ | |
for (UIView *v in self.subviews) | |
{ | |
CGPoint localPoint = [v convertPoint:point fromView:self]; | |
if ( v.alpha > 0.01 && ![v isHidden] && v.userInteractionEnabled && [v pointInside:localPoint withEvent:event] ) | |
return YES; | |
} | |
return NO; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment