Suppose, we have two view controllers - Controller A and Controller B.
Tapping on a particular item on Controller A pushes the Controller B. I set the color of the navigation bar buttons in the didFinishLaunchingWithOptions method in my AppDelegate.m using this -
[[UINavigationBar appearance] setTintColor:[UIColor blueColor]];
Works well on every navigation controller I have in my app. What I want is that I have a different color for the buttons on the navigation bar in Controller A and a different color for those in Controller B.
Is this possible?
What I have tried so far...
Put this code in the method in Controller A that pushes Controller B -
[[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]];No go.
This went in the
viewWillAppearmethod of Controller B -[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];Nothing
self.navigationItem.backBarButtonItem.tintColor = [UIColor whiteColor];Still no change.
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];*about to slam my machine against the wall
(Writing from my new computer) What code should I be using to accomplish this and where should I be putting it?
Thanks in advance.