清空多余视图之利器

-(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];
            }
        }
    }
}

 

posted @ 2013-01-25 01:43  ygm900  阅读(208)  评论(0编辑  收藏  举报