I have this problem. I have a tabbar created in appDelegate:
RootViewController *controller = [[RootViewController alloc] initWithNibName:@"RootView" bundle:nil];
UINavigationController *rootNavigationController = [[UINavigationController alloc] initWithRootViewController:controller];
[other controllers initialized...]
self.tabController = [[UITabBarController alloc] init];
self.tabController.viewControllers = [NSArray arrayWithObjects:rootNavigationController,secondController,thirdController, nil];
Now when in RootViewController I try to assign an image to the tabBar:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.tabBarItem.image = [UIImage imageNamed:@"tabRoot.png"];
self.tabBarItem.title = @"Root";
}
But nothing is displayed, why? The strange thing is that if I do the same thing but without the navigationController, the image is correctly displayed.