When a user clicks on a button, I create a UITabBarController with two viewcontrollers attached to it. I then push the TabBarController onto my navigationController stack and it displays without problems. The problem is trying to set a badge on one of the tab bar items when the tabbarControlelr is loaded, I tried:
[[self.tabBarController.viewControllers objectAtIndex:1] setBadgeValue:@"1"];
and a whole lot of variations of this one, but none gives me a round red button thingy on the tabbar item.
Any suggestions?
Thanks,
Ron
EDIT
Code how I present the tabBarController
Airline_RosterAppDelegate *appDelegate = (Airline_RosterAppDelegate *)[[UIApplication sharedApplication] delegate];
CrewHere *vc = [[CrewHere alloc] initWithNibName:@"CrewHere" bundle:nil];
vc.title = @"Crewlist";
MessagesDetailed *mvc = [[MessagesDetailed alloc] initWithNibName:@"MessagesDetailed" bundle:nil];
mvc.title = @"Messageboard";
[tabbar setViewControllers:[NSArray arrayWithObjects:vc, mvc, nil]];
[tabbar setToolbarItems:[NSArray arrayWithObjects:@"Crewlist", @"Messageboard", nil]];
[appDelegate.navigationController pushViewController:tabbar animated:YES];