iPhone Set Tint Color of Back Bar Button Item iPhone Set Tint Color of Back Bar Button Item xcode xcode

iPhone Set Tint Color of Back Bar Button Item


I believe barButtonItem is read-only. (I'm not too sure about this, someone correct me if I'm wrong)

To give a tint colour to these buttons, this is what I would do:

In your App Delegate, add these lines of code:

UIBarButtonItem *barButtonAppearance = [UIBarButtonItem appearance];[barButtonAppearance setTintColor:[UIColor redColor]]; // Change to your colour

The first line sets an appearance proxy, so I believe this works too, if you like less code:

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

I hope this works for you! (This changes all instances of UIBarButtonItem)


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

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

Or You can create a custom button and initialize your UIBarButtonItem as

UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:yourUIButton];


This worked for me.

[self.navigationController.navigationBar setTintColor:[UIColor redColor]];

It is very similar to the second answer...