谁能告诉我如何在我的故事板中隐藏导航栏。下面的代码在模拟器中运行时运行良好,但它仍然出现在我的故事板中,这真的让我很烦,因为它弄乱了我的图像位置。任何人都可以帮忙吗?
- (void) viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
}
- (void) viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[self.navigationController setNavigationBarHidden:NO animated:animated];
}