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