Skip to content

Instantly share code, notes, and snippets.

@akinLiu
Created October 13, 2014 16:01
Show Gist options
  • Save akinLiu/db634d023d95adac4aba to your computer and use it in GitHub Desktop.
Save akinLiu/db634d023d95adac4aba to your computer and use it in GitHub Desktop.
- (UIImageView *)findHairlineImageViewUnder:(UIView *)view {
if ([view isKindOfClass:UIImageView.class] && view.bounds.size.height <= 1.0) {
return (UIImageView *)view;
}
for (UIView *subview in view.subviews) {
UIImageView *imageView = [self findHairlineImageViewUnder:subview];
if (imageView) {
return imageView;
}
}
return nil;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment