我正在使用 IOS5 故事板。我的视图控制器路径如下:
tabbarVC --> navigationVC-1 --> tableVC-1 --(via segue push)-> tableVC-2 --(via segue modal)-> navigationVC-2 --> tableVC-3
在 tableVC-3 中的取消按钮回调操作方法中,我调用[self dismissViewControllerAnimated:YES completion:nil];
成功让我回到 tableVC-2。但是,当我尝试在调试器中向后检查导航路径时,我看不到从 navigationVC-2 访问 tableVC-2 的方法。我希望navigationVC-2 保持到tableVC-2 或navigationVC-1 的链接,但似乎没有。请在下面查看我的调试器输出。
有人可以解释导航层次结构以及如何以编程方式向后遍历链吗?
(gdb) po self
<tableVC-3: 0x6d33340>
(gdb) po (UIViewController*) [self navigationController]
<UINavigationController: 0x6d33560>
(gdb) po (UIViewController*)[[self navigationController] navigationController]
Can't print the description of a NIL object.
(gdb) po (UIViewController*)[[self navigationController] topViewController]
<tableVC-3: 0x6d33340>
(gdb) po (UIViewController*)[[self navigationController] presentingViewController]
<UITabBarController: 0x6b2eba0>
(gdb) po (UIViewController*)[[self navigationController] presentedViewController]
Can't print the description of a NIL object.
(gdb) po (UIViewController*)[[self navigationController] visibleViewController]
<tableVC-3: 0x6d33340>