Question

I tried to do it with a lot of ways, but it didn't work. Show me the way to do it please.

[[[[[self navigationController] navigationBar] backItem] backBarButtonItem] setTintColor: [UIColor whiteColor]];

This code didn't work

Was it helpful?

Solution

In iOS 7, tint color is a property of UIView. If not set, this is inherited. Setting the tint color of the navigation bar itself will affect subviews of it, but not the actual background of the bar (liked it used to in iOS 6).

Try this:

self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

OTHER TIPS

Try this one.

  [[[self navigationController] navigationBar] setTintColor: [UIColor whiteColor]];

You can try this.

[[UIBarButtonItem appearance] setTintColor:[UIColor purpleColor]];

To change back button chevron throughout the entire app do this:

self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

*Note that if you are using more than 1 UINavigationController, you will have to set this for each one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top