Created
March 8, 2011 20:28
-
-
Save neogithub/860964 to your computer and use it in GitHub Desktop.
For loop through objects by type or tag
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
| for (id object in [self.view subviews]) { | |
| if ([object isKindOfClass:[UIButton class]]) { | |
| [object removeFromSuperview]; | |
| } | |
| } | |
| for (UIView *iView in [self.view subviews]) { | |
| if (iView.tag == TARGET_CLASSIFICATION_TYPE) { | |
| [iView removeFromSuperview]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment