【发布时间】:2023-03-17 20:46:01
【问题描述】:
以下是我的故事板,
ViewController(CaseInfo 或 VC2)显示导航栏
http://i.imgur.com/nQqj1IQ.png
但在我的模拟器中,导航栏不显示!
在 VC1(案例列表)中: 我让VC1成为导航控制器的rootView
我通过选择“推送”选项将 VC1 链接到 VC2
然后我在点击VC1的表格项时使用代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
CaseList *tagEditor = [self.storyboard instantiateViewControllerWithIdentifier:@"CaseInfo"];
[self presentViewController:tagEditor animated:YES completion:nil];
}
但是VC2中的导航栏不显示
请帮帮我...
谢谢!!
-
顺便说一句
我也使用VC2(CaseInfo)中的代码
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:animated];
}
【问题讨论】:
标签: ios objective-c uitableview uinavigationcontroller uinavigationbar