Search code examples
iosuinavigationcontrolleruitabbarcontrollerrootview

Navigation Controllers with the same root view


So suppose you need some functionality that requires next storyboard. For example you need to upload different content to view depending on what tab is clicked. storyboard

But the problem comes out when you try to use this storyboard. When you switch tabs you getting this behaviour. bad behaviour

But in first tab everything fine. So looks like it doesn't load view second time. Can somebody explain or give a link to the behaviour of navigation controller in this case, because I can't find anything useful in reference. Or how should I correct this behaviour in IB or programatically?
Thanks.


Solution

  • a simple work-around is to put a "fake-viewcontroller" as root for the second navigation. On this "fake" controller execute in viewDidLoad a [self performSegueWithIdentifier: @"goToTheControllerHereWeGo" sender: self];