【发布时间】:2014-07-18 17:36:43
【问题描述】:
目前我正在使用 Unwind 进入其路径的主视图。
这是我在 Sender ViewController 上的代码:
- (IBAction)showRecents:(UIStoryboardSegue *)segue {
[self.navigationController.tabBarController setSelectedIndex:1];
NSLog(@"Root of Navigation Executed");
}
这是展开前的样子
这是从源视图控制器展开后的样子:
问题是我不明白为什么它没有显示绿色顶栏?和 TabBarController 有关系吗?
这是我的路径 VC:
【问题讨论】:
-
为什么SourceVC没有导航栏?你把它设置为隐藏在那里吗?
-
不,有办法验证吗?
-
验证什么?看起来你是从 ProfileTableviewController 推送到 SourceVC 的,所以应该有一个导航栏,除非你把它设置为隐藏。
-
但如果它隐藏了,为什么它会在展开前显示? Unwind 只是将我带到 Sender Controller。
-
我的意思是隐藏在 SourceVC 中,而不是 SenderVC。如果你在 SourceVC 中设置为隐藏,那么返回时它仍然是隐藏的。尝试将其设置为不隐藏在 SenderVC 的 viewWillAppear 方法中。
标签: ios uinavigationcontroller uitabbarcontroller stack-unwinding