I have two UITabController
s. One is controllable from UIViewController
s that are nested within the scope of the first UITabController
(lower in the hierarchy). When I change the selectedIndex
of the one lower in the hierarchy it also change the other one. I've tried many things (see below) and nothing seems to work. Any idea how I can control one and not the other.
// Controls both
self.tabBarController!.selectedIndex = curTab
// Doesn't do anything
(self.storyboard?.instantiateViewController(withIdentifier: "SecondTabBar") as! UITabBarController).selectedIndex = curTab
// Where stb is via classes to the storyboard of UITabController also doesn't work
stb.selectedIndex = curTab
Containing a tab bar controller inside another tab bar controller is not a supported configuration.