I'm developing an app for a client of mine and they want to be able to deeplink to a specific view controller from the app being terminated. Here is the current stack:
- Launch Screen
- Splash Screen (Here is where we download our config file)
- VC1
- VC2
- VC3
- VC4
- VC5
The client wants the ability, via a deeplink, to launch the app, and after the Splash Screen completes the config file download, to navigate to a specific view controller (VC1-VC5). The issue is that they want to retain the stack. So i cannot simply push VC5 from the Splash Screen because VC5 needs the ability to go back to VC4 than VC3 than VC2, etc.
What is the best way to handle this? Any help would be greatly appreciated. Thanks in advance!
You can set a navigation stack all at once by using the UINavigationController setViewControllers method. Just create an instance of each view controller and pass them to your nav controller like this:
Just be aware that this will overwrite all view controllers currently in the navigation stack. vc1 would become your navigation controller's root vc.