Created
July 26, 2012 04:18
-
-
Save johncalvinyoung/3180228 to your computer and use it in GitHub Desktop.
Remove all subviews from a view
This file contains hidden or 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
- (void)removeAllSubviewsFrom:(UIView *)view { | |
NSArray *subviews = [view subviews]; | |
for (UIView *subview in subviews) { | |
[subview removeFromSuperview]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment