I am trying to set the tint color of the back button within a navigation controller, but nothing is working. I have tried
[self.navigationController.backBarButtonItem setTintColor:myColor];
//myColor was previously set
But it stays the default tint
You can't change the tint color of UINavigationItem directly. You have to change the tint color of navigation bar and your bar button will automatically change its color.
Add these lines in your viewWillAppear method
Or You can create a custom button and initialize your UIBarButtonItem as
Well you can certainly change the color of just the Back Button or perhaps any Bar Button on the Navigation bar. Here's a small snippet to do it.
Well this is just one of the ways for doing this. I hope this helps!! I know the answer for it is already accepted, but I thought to give a proper snippet to it. Cheers!!! Happy Coding!!
This worked for me.
It is very similar to the second answer...
Place the following code in AppDelegate that will set color for Back button globally
This is supported in iOS 5 and above