After a user logs in on my app, I then construct some view controllers and a UITabBarController that is then persistent through the rest of my app. Here is the code for that:
.......
//construction of view controllers, standard
NSMutableArray *topLevelControllers = [[[NSMutableArray alloc] init] autorelease];
[topLevelControllers addObject: paymentNavController];
[topLevelControllers addObject: customerNavController];
[topLevelControllers addObject: historyNavController];
UITabBarController *tabBarController = [[[UITabBarController alloc] init] autorelease];
tabBarController.delegate = self;
[tabBarController setViewControllers:topLevelControllers animated:NO];
tabBarController.selectedIndex = 1;
So then lets say in my customerNavController I have a table view and I want to switch the user over to the paymentNavController, switching the selected index of the tabBarController as well.
So how can I, from one of the view controllers it contains, access that UITabBarController?