In my app i have custom view subclass of UIView, let's say i wanna remove all my UIView from my main view i will use :
for (UIView *aView in self.view.subviews)
{
[aView removeFromSuperView];
}
for (ViewAlertiPad *anAler in self.view.subviews)
{
[anAler.layer removeAllAnimations];
[anAler removeFromSuperview];
}
for (CALayer* layer in [self.view.layer sublayers])
{
[layer removeAllAnimations];
}
But how can i loop from all subclass of UIView in my main view ?