查找并删除视图

UIWindow *win = [[UIApplication sharedApplication].windows objectAtIndex:0];

    for (UIView* uv in win.rootViewController.view.subviews) {
        if([[NSString
             stringWithUTF8String:object_getClassName(uv)]
            isEqualToString:@"LockerView"]){
            [uv removeFromSuperview];
        }
    }

 

posted on 2015-07-01 15:59  大木哥  阅读(221)  评论(0编辑  收藏  举报

导航