I have a UITabBarController with 4 views/tabs. Each view is a UINavigationController.
How can I popToRootViewController on one of these UINavigationControllers then switch tabs and push a viewController onto another UINavigationController using animation throughout?
So the sequence would be:
At start we are in Tab 1's view which is a UINavigationController. A View has been pushed onto it beyond its root ViewController.
-Tab 1
- UINavigationController1
- RootViewController1
- SomeViewController1 [We are here]
-Tab 2
- UINavigationController2
- RootViewController2
A button is tapped in SomeViewController1 that causes the following:
- UINavigationController1 pops to its root view controller (with animation)
- UITabBarController switches tab to Tab2
- SomeViewController2 is pushed onto UINavigationController2 (with animation)
So the view looks like this:
-Tab 1
- UINavigationController1
- RootViewController1
-Tab 2
- UINavigationController2
- RootViewController2
- SomeViewController2 [We are here]