Skip to content

Instantly share code, notes, and snippets.

@samgreen
Created May 3, 2012 16:29
Show Gist options
  • Save samgreen/2587013 to your computer and use it in GitHub Desktop.
Save samgreen/2587013 to your computer and use it in GitHub Desktop.
NSArray *subviews = [self.view subviews];
for (NSInteger i = 0; i < subviews.count; i++) {
UIView *subview = [subviews objectAtIndex:i];
if ([subview isKindOfClass:[UIImageView class]]) {
NSArray *imageSubviews = [subview subviews];
for (NSInteger j = 0; j < imageSubviews.count; j++) {
UIView *imageSubview = [imageSubviews objectAtIndex:i];
if ([imageSubview isKindOfClass:[UIImageViewX class]]) {
[imageSubview removeFromSuperview];
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment