在我的应用委托中,这是我导航到SWRevealViewController
let revealViewController = mainStoryboard.instantiateViewControllerWithIdentifier("RevealView") as? SWRevealViewController
self.window!.rootViewController = revealViewController
self.window?.makeKeyAndVisible()
我从SWRevealViewController
的{{1}}导航到那个内部视图控制器。
FrontViewcontroller
现在在let secondViewController = self.storyboard?.instantiateViewControllerWithIdentifier("Read") as! ReadViewController
secondViewController.title = self.selectedTitle
self.navigationController?.pushViewController(secondViewController, animated: true)
收到推送通知时,我想要导航AppDelegate
。当我点击后退按钮时,它应该回到ReadViewController
,就像它以正常方式发生一样。如何在FrontViewController
的通知代理中执行此操作
请帮我。
感谢
答案 0 :(得分:0)
试试这个:
let yourVC = mainStoryboard.instantiateViewControllerWithIdentifier("Read") as! ReadViewController
let frontViewController = mainStoryboard.instantiateViewControllerWithIdentifier("frontViewController") as! FrontViewController
let navController = UINavigationController()
navController.viewControllers = [yourVC,frontViewController]
self.window!.rootViewController = navController
self.window?.makeKeyAndVisible()