iOS remove all subview

how the remove all subview

NSArray *viewsToRemove = [self.mainView subviews];
for (UIView *v in viewsToRemove) 

{
       [v removeFromSuperview];
       NSLog(@"%@ view removed",v);
}

0 意見: