Skip to content

Instantly share code, notes, and snippets.

@neogithub
Created March 8, 2011 20:28
Show Gist options
  • Select an option

  • Save neogithub/860964 to your computer and use it in GitHub Desktop.

Select an option

Save neogithub/860964 to your computer and use it in GitHub Desktop.
For loop through objects by type or tag
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