I have a UITabBarController configured with two separate UIViewControllers. In init for the second UIViewController, I set UITabBarItem so that it displays the tab correctly:
UITabBarItem *tabBar = [self tabBarItem]; [tabBar setTitle:@"DATA"]; [tabBar setImage:[UIImage imageNamed:@"DATA.png"]];
This works great, the tab displays the name "DATA" and displays the correct icon image. In the same controller inside loadView, I set the UIViewController header:
[self setTitle:@"Data Table"];
My question is that when I launch the application, my second tab reads “DATA”, however, when I click on the tab and loadView is called (I have a UITableView there), and I set the UNViewControllers header property to “Data table” Second tab also changes to "Data Table". Is there any way to fix / avoid this?
source share