Reputation: 4401
I am wondering if it is possible to change the tab bar item controller on touch.
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
{
if(smth)
{
[tabBarController setSelectedIndex:4];
}
}
Need functionality like this, but I don't have that in tabBarController
array of controllers.
Basically, I want to replace controllers at some point.
Upvotes: 0
Views: 1257
Reputation: 8664
Have a look at the UITabBarControllerDelegate protocol reference
If you set an object to be the delegate of a UITabBarController, you will get call back that will give you entry point to some interesting point in the life of the UITabBar
This doesn't work?
[tabBarController.tabBar setItems:(NSArray *)items animated:(BOOL)animated];
Upvotes: 1