In my Delegate i am trying to select my TabBarController
so that i can style it with a different background. However the problem is that my TabBarController
is not located on the rootView..
My current code:
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
UITabBar *tabBar = tabBarController.tabBar;
UITabBarItem *tabBarItem1 = [tabBar.items objectAtIndex:0];
UITabBarItem *tabBarItem2 = [tabBar.items objectAtIndex:1];
In my interface builder i have my TabBarController
setup with a Segue name: mainView (This is where the TabBarController
is located).
How could i select my TabBarController
?