I have a navigation controller which should have a different root depending on the state of my App.
How can i model this within Interface Builder? I've dragged out a UINavigationController to my Storyboard. Now I need to make the connections to the two view controllers.
Sadly I can only set one as root view controller. Do i need to subclass the Navigation Controller and based on the state reset the root view controller?
What is the best practise for this kind of problem? It would be nice to visualize this relationship within Interface Builder.
Thanks in advance for any help.
As it is the rootViewController you want to change conditionally, you could instead have two different navigationControllers, each with the one of the two different viewControllers as its rootViewController.
You could then present the appropriate navigationController based on your condition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With