【发布时间】:2016-07-15 09:43:12
【问题描述】:
我有一个rootviewcontroller,它正在扩展UITabBarController。它有几个孩子viewcontrollers。
我想要的只是以编程方式从第一个中选择第二个/第三个/..viewcontroller。我用过
`.selectedViewController`, `.selectedIndex`, `.navigationController.tabBarController.tabBar.selectedItem = ...`
以及这个主题的所有变体。我在使用时注意到以下内容
`tabBarController.selectedViewController = tabBarController.viewControllers?[1]`
tabBarController 会显示第二个viewcontroller,但会返回到第一个viewcontroller。我有预感这是焦点引擎,但我现在迷路了。
【问题讨论】:
-
你在哪里做所有这些代码?
标签: ios swift uitabbarcontroller tvos focus-engine