iOS 隐藏Navigationbar导航栏

需求是这样的,只在首页隐藏Navigation Bar,其他页面都不隐藏。

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

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

援引:http://www.jianshu.com/p/efb960fed457

转载于:https://www.cnblogs.com/gaozhang12345/p/7693196.html

你可能感兴趣的:(iOS 隐藏Navigationbar导航栏)