难道UITabBarController可以在代码中选择选项卡吗?比如UINavigationController我们可以使用popViewController弹出回rootViewController而不是按下后退按钮,那么如何在tabbarcontroller中实现呢?
Ger*_*ies 74
在UITabBarController上使用selectedIndex属性.可以在UITabBarController类参考中找到更多信息.
controller.selectedIndex = 4;
或使用
[controller setSelectedIndex:4];