UITabBarController是否可以在代码中选择选项卡?就像UINavigationController一样 我们可以使用popViewController弹回rootViewController来代替按后退按钮,那么在tabbarcontroller中如何实现呢?
最佳答案
使用 UITabBarController 上的 selectedIndex 属性。更多信息可参见UITabBarController Class Reference .
controller.selectedIndex = 4;
或使用
[ Controller setSelectedIndex:4];
关于iphone - UITabBarController 可以通过代码选择选项卡吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/833389/