嘿,大家好,我想在相关的 UIViewControllers
中获取我的 UITabbarController
的选定索引。
我尝试使用 [selfparentViewController];
获取 parentViewController
但看来,这不是正确的方法,因为我返回的 Controller 没有像 这样的方法>selectedIndex
左右。有什么建议吗?
最佳答案
访问 tabBarController 的 selectedIndex
属性
tabBarController.selectedIndex
关于iphone - 如何在相关 View Controller 中获取我的 tabbarcontroller 的选定索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13136050/