Created
April 17, 2014 06:09
-
-
Save kythanh/10956781 to your computer and use it in GitHub Desktop.
how to remove all subviews of uiview iOS
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
We got serveral way to archive this: | |
1. [[currentView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; | |
2. Using loop: | |
for(UIView *subview in [currentView subviews]) { | |
[subview removeFromSuperview]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this tip :)