UInavigationController Navbar不会隐藏

时间:2014-11-05 00:05:40

标签: ios uiviewcontroller uinavigationcontroller uinavigationbar

似乎无法让导航栏隐藏起来。我确信这应该像我之前使用的那样工作,但这次它不起作用。不确定是否因为xcode 6更新了。

- (void)viewDidLoad {
    [super viewDidLoad];

    // Do any additional setup after loading the view.

}
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES];   //it hides
}

-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:NO];    // it shows
}

0 个答案:

没有答案