第一种
for(UIView *view in [self.view subviews])
{
[view removefromsuperview];
}
第二种
[self.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
for(UIView *view in [self.view subviews])
{
[view removefromsuperview];
}
[self.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];