清空多余视图之利器

-(void)clearThisController
{
    for (id obj in [self.view subviews]) {
        if([obj isKindOfClass:[UIView class]]){
            UIView *view = (UIView *)obj;
            if (view.tag != 99999) {
                [view removeFromSuperview];
                [view release];
            }
        }
    }
}

 

你可能感兴趣的:(视图)