在以模态方式呈现的viewController中显示navigationController

时间:2015-01-07 14:28:35

标签: ios swift uinavigationcontroller

当用户收到推送通知时,viewController会显示appDelegate

我的问题是,我无法找到一种方法来显示原始navigationController及其navBar和按钮。

请注意,我的应用有一个tabBarController,包含4个项目,每个项目都有他的导航控制器。

=> navigationController A => VC1 => VC2

=> navigationController B => VC1 => VC2

navigationController => rootViewController  => tabBar

=> navigationController C => VC1 => VC2

=> navigationController D => VC1 => VC2

所以我在viewWillAppear尝试了这个但是没有用过:

 override func viewWillAppear(animated: Bool) {

    if self.navigationController == nil {

        let navigationController = UIApplication.sharedApplication().windows[0].rootViewController as UINavigationController

        self.navigationController == navigationController
    }

}

0 个答案:

没有答案