I am looking at changing the graphics on a tabbar, such as
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
UITabBar *tabBar = tabBarController.tabBar;
UITabBarItem *tabBarItem1 = [tabBar.items objectAtIndex:0];
UITabBarItem *tabBarItem2 = [tabBar.items objectAtIndex:1];
UITabBarItem *tabBarItem3 = [tabBar.items objectAtIndex:2];
UITabBarItem *tabBarItem4 = [tabBar.items objectAtIndex:3];
tabBarItem1.title = @"Home";
tabBarItem2.title = @"Maps";
tabBarItem3.title = @"My Plan";
tabBarItem4.title = @"Settings";
The problem I have here is that my tabbarcontroller is not my root view, so how can I reference the tabbarcontroller to change the tab images?
I am following a suggestion from this post (Can I have more than 1 UITabBarController?) that refers to having a tableview that links to one or more tabbarcontrollers.
So my root view is not a tab bar, but the tab bar view is loaded after coming from one previous screen.
I have this all working, with the initial screen and then the tab bar, and everything is working fine, I just need to change the graphics on the tab bar, and am not able to do this as all tutorials on changing tab bar graphics use the app delegate and refer to the tabbarcontroller as the root view.
Any help on this greatly appreciated!