我试图在我的应用程序中根本不选择任何标签.首先选择第一个选项卡,但我想取消选择它,因此根本不会选择任何选项卡.
不要问我为什么,这就是客户想要的方式!呵呵
谢谢你的帮助!
PS:我已经尝试过了:
// rootController = UITabBarController
rootController.tabBar.selectedItem = 0;
rootController.tabBar.selectedItem = nil;
[rootController setSelectedIndex:[rootController.items objectAtIndex:0]];
[rootController setSelectedIndex:nil];
[rootController setSelectedIndex:0];
// That one works : (but I can't select 0 or -1 for instance)
[rootController setSelectedIndex:2];
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?再次感谢!