I want to set title to tab item programatically, but it not works. My code is below:
- (IBAction)tab1Click:(id)sender {
myTabBarController = [[UITabBarContro
The title displayed on a given tab bar item is determined by the corresponding view controller's instance of UITabBarItem. Those aren't mutable, though... if you want to change the title (or image, or tag), you have to make a new item and assign it to the view controller.
UITabBarItem *item2 = [[UITabBarItem alloc initWithTitle:@"someTitle" image:someImage tag:0];
viewController2.tabBarItem = item2;