先看一下代碼:
-(void)gotoInformationViewController:(id)sender
{
MoreViewController *moreViewController = [[MoreViewController alloc] init];
[self.navigationController pushViewController:moreViewController animated:YES];
[moreViewController release];
}
用來推進MoreViewController
,但是推進之後沒有UINavigationBar
出現,屏幕上只有UITableView
在view Controller中試試這個:
- (void) viewWillAppear:(BOOL)animated
{
[self.navigationController setNavigationBarHidden:NO animated:animated];
[super viewWillAppear:animated];
}
在界面生成器viewcontroller的頂部條不能設置為無