I created a UITabBarController like this:
InfoViewController *iVC = [[InfoViewController alloc] init];
self.infoViewController = iVC; // retain property
UITabBarItem *tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemSearch tag:0];
self.infoViewController.tabBarItem = tabBarItem;
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:myVC];
self.navigationController = nc;
UITabBarItem *tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemMostRecent tag:1];
self.navigationController.tabBarItem = tabBarItem;
UITabBarController *tbc = [[UITabBarController alloc] init];
NSArray* controllers = [NSArray arrayWithObjects:self.infoViewController, self.navigationController, nil];
self.tabBarController = tbc; // retain property!
self.tabBarController.viewControllers = controllers; [tbc release];
Problem: I see a black Tab Bar at the bottom and a white content area. The first view controller in the array has a red background color. So it should appear red.
The Tab Bar shows no items, it's empty.
What can be the problem? I don't use nib files... No warnings, no errors, nothing logged to console. Just empty Tab Bar.