I need some idea or starting point to the following question:
I have an app which starts with an TabBarView – in some Tabs there are different Views / ViewControllers which are connected by seques.
If the active Tab is changed, i want the (now) open Tab to load the “Start”-View/ViewController of this Tab, not the View/ViewController which was last active on this Tab.
How can i do that?
I suggest you look at using the
UITabBarDelegatemethod:tabBarController:didSelectViewController:combined with the
UINavigationControllermethod:popToRootViewControllerAnimated:So when the user selects a tab, you can ensure that the navigation begins from the root controller.
EDIT IN RESPONSE TO COMMENT:
It’s not an ideal situation, but you can reference the UITabBarController in the app delegate. E.g.:
You can then implement the UITabBarDelegate method similar to:
I haven’t tested this though!