我有两个UITabController,一个是可以从嵌套在第一个UITabController范围内(层次结构中较低的)的UIViewControllers控制的。当我更改层次结构中较低的一个的selectedIndex时,它也会更改另一个。我尝试过很多事情(见下文),但似乎没有什么效果。知道我怎么能控制其中一个而不是另一个。
// 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发布于 2018-11-10 05:56:09
我有两个UITabControllers。一个是可以从UIViewControllers中控制的,它嵌套在第一个UITabController的范围内(在层次结构中较低)。
在另一个选项卡条控制器不是受支持的配置。中包含一个选项卡条控制器。
https://stackoverflow.com/questions/53236270
复制相似问题