I have my interface completely laid out with Storyboards (including the UITabBarController and all corresponding views).
Now comes the time to customize the Tab Bar. Since I have icons that are already set to the correct colour, I can't use [[UITabBar appearance] setTintColor:]
(it just keeps looking wrong).
Turns out I'm supposed to use setFinishedSelectedImage:withFinishedUnselectedImage:
on the specific UITabBarItem's.
Is it possible to use this method from the AppDelegate (where the rest of my global customization occurs)? How does the AppDelegate know which UITabBar to target?
If instead, I'm supposed to customize each UITabBarItem from each UIViewController, how do I reference the UITabBar (or "root view controller"?) and then specific item from the UIViewController?
Any help would be greatly appreciated. Thanks!
In viewDidLoad
of your UIViewController
instances, you can do
[self.tabBarItem setFinishedSelectedImage: withFinishedUnselectedImage:]