Skip to content

Instantly share code, notes, and snippets.

@elpsk
Created December 4, 2013 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elpsk/7787317 to your computer and use it in GitHub Desktop.
Save elpsk/7787317 to your computer and use it in GitHub Desktop.
Pass through view
@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