【发布时间】:2017-02-15 10:30:02
【问题描述】:
我有 5 个视图控制器(A、B、C、D、E),所有这些视图控制器都以编程方式连接,我可以在它们之间成功推送和弹出。
使用:
navigationController?.pushViewController(loginVc, animated: true)
_ = navigationController?.popViewController(animated: true)
注意: ViewController A 首先作为默认初始 viewController 出现。
现在,我想要的是,当用户安装应用程序时,只有第一次 viewController A 必须显示为初始 viewController,其余时间打开应用程序时,viewController D 必须是初始viewController 从那里我应该能够在以前的 viewControllers 之间跳转。我该如何实现这一点。我正在使用 Xcode 8.2、Swift 3.0
提前致谢。
【问题讨论】:
-
你的?
only for the first time the viewController A must be shown as the initial viewController, rest of the times when the App is opened有答案。显示你尝试过的代码 -
您需要简单地定义您的 navigationController 的 rootViewController,然后才能在 AppDelegate didFinishLaunching 方法中看到应用。
-
我很抱歉没有提供代码。这背后是有原因的。我认为这个解释足够清楚,可以给我一个解决方案,我是从 Florensvb 那里得到的。其他一些答案也有帮助。感谢stackoverflow社区:)
标签: ios swift uiviewcontroller navigation