I want to set title to tab item programatically, but it not works. My code is below:
- (IBAction)tab1Click:(id)sender { myTabBarController = [[UITabBarContro
try this
[(UIViewController *)[tabBarController.viewControllers objectAtIndex:Index] setTitle:@"Title"];
or also you can set tab bar by in this way
UITabBarItem *tabItem = [[[tabBarController tabBar] items] objectAtIndex:INDEX]; [tabItem setTitle:@"TITLEe"];