4

我正在使用包含 Navigation Controller 的初始 Root-View 控制器:

在此处输入图像描述

现在我想从 uiviewcontroller 1.2.1 导航到 uiviewcontroller 1.1

self.pushview 和 self.popView 等所有常规解决方案都不起作用;他们正在创建包含页面的 UITabBarController 的另一个实例......请大家携手合作.. 任何帮助将不胜感激............

4

2 回答 2

8

您不必对导航控制器层次结构感到惊愕

用于将自导航控制器导航到父导航控制器使用

self.tabBarController.navigationController

使用此代码

PUSH : [self.tabBarController.navigationController pushViewController:objNav animated:YES];

POP  : [self.tabBarController.navigationController popViewControllerAnimated:YES];

谢谢,

于 2012-08-28T09:02:24.077 回答
0

对于 Swift 3.0

推:

self.tabBarController?.navigationController?.pushViewController(ViewControleer, animated: true)
self.tabBarController?.show(ViewControleer, sender: self)

流行音乐:

self.tabBarController?.navigationController?.popToRootViewController(animated: true)
self.tabBarController?.navigationController?.popViewController(animated: true)
self.tabBarController?.navigationController?.popToViewController(ViewControleer, animated: true)
于 2017-05-09T19:45:58.970 回答