简体   繁体   English

如果是首次使用该应用,则显示其他导航控制器

[英]Showing a different navigation controller if it's the first time using the app

The app is going to have a specific 'journey' for new users to follow when they first use the application. 该应用程序将有一个特定的“旅程”,供新用户首次使用该应用程序时遵循。 This is a separate NavigationController from the TabController which encompases the core app. 这是与TabController分开的NavigationController ,后者包含核心应用程序。

I know I can store whether or not someone has been through the process before. 我知道我可以存储是否有人曾经通过此过程。 My question is where would be the correct place to handle this logic. 我的问题是,处理此逻辑的正确位置在哪里。 Would you do it in the AppDelegate within didFinishLaunchingWithOptions . 您是否会在didFinishLaunchingWithOptions中的AppDelegate执行此操作。 Or within the TabViewController . 或在TabViewController Or somewhere completely different? 还是完全不同的地方?

I'm not too sure how I'd handle it within the delegate , it just feels like a cleaner way to do it. 我不太确定如何在delegate处理它,这只是一种更清洁的方式。

Within the TabViewController , I'd perform a segue to the NavigationController . TabViewController ,我将对NavigationController I don't want there to be any visible transition to the NavigationController . 我不希望对NavigationController进行任何可见的过渡。

Typically you implement a first-launch-only screen, or sequence of screens, by presenting one or more modal view controllers if the code logic decides they are needed. 通常,如果代码逻辑确定需要一个或多个模态视图控制器,则可以通过展示一个或多个模态视图控制器来实现仅首次启动的屏幕或一系列屏幕。 Then when you dismiss them, the normal app UI is waiting underneath. 然后,当您关闭它们时,普通的应用程序UI在下面等待。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM