从窗口中删除视图会在短时间内显示黑屏

时间:2012-06-29 11:30:05

标签: ios ios5

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    MyAuraAppDelegate *delegate = (MyAuraAppDelegate *) [[UIApplication sharedApplication] delegate];
    // PeopleMasterViewController *peopleMasterViewControl = [[PeopleMasterViewController alloc] initWithNibName:nil bundle:nil];

    NSArray *viewsToRemove = [delegate.window subviews];
    for (InfiniTabBar *v in viewsToRemove) 
    {
        [v setHidden: YES];
    }  

}

但是在显示另一个View之前,它会在短时间内给我一个黑屏。如何删除黑屏?

2 个答案:

答案 0 :(得分:1)

只需删除自定义标签栏

即可
NSArray *viewsToRemove = [delegate.window subviews];
for (InfiniTabBar *v in viewsToRemove) 
{
    if ([v isKindOfClass:[InfiniTabBar class]]) {
        [v setHidden: YES];
    }
}  

答案 1 :(得分:0)

尝试将代码移至viewWillAppear:,以便更接近屏幕更新时间。