I am trying to make a UITabBarController programmatically. This seems to work, I have 2 tabs, the problem is that it does not display the second name of the tab in the RootViewController when it loads for the first time. Why?
This is when the RootViewController loads:

When I click on the second tab where there is no name, the title appears:

When I return, the title of the second tab still exists:

My question is why it does not appear when RootViewController boots.
my appDelegate method in didFinishLaunchingWithOptions file:
tabBarController = [[UITabBarController alloc] init];
MenuViewController *firstTab = [[MenuViewController alloc] initWithNibName:@"MenuViewController" bundle:nil];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:firstTab];
FixtureViewController *secondTab = [[FixtureViewController alloc] initWithNibName:@"FixtureViewController" bundle:nil];
UINavigationController *navController2 = [[UINavigationController alloc] initWithRootViewController:secondTab];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = @[navController, navController2];
[self.window setRootViewController:tabBarController];
source
share