Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change backbutton color iOS7

I've been developed an app for iOS7 which has this design

enter image description here

As you can see there's a blue arrow for all my BackButton (using UINavigationController and segues), I want to make them red, this is my code:

[UIBarButtonItem   appearance]setTintColor:(UIColorFromRGB(toolbarTintColor))];
[[UIBarButtonItem  appearance]setTitleTextAttributes:textAtributesDictionaryNavBarButtons forState:UIControlStateNormal];

but results only applies to all other buttons, any help I'll appreciate

thanks in advance for the support

like image 338
Jesús Ayala Avatar asked Oct 09 '13 16:10

Jesús Ayala


People also ask

How do I customize the back button on my iPhone?

Turn on Back Tap Check that you have the latest version of iOS on your iPhone 8 or later. Go to Settings > Accessibility > Touch, and tap Back Tap. Tap Double Tap or Triple Tap and choose an action. Double or triple tap on the back of your iPhone to trigger the action you set.


1 Answers

The tint color property of a navigation bar determines the color of the text of its bar button items in iOS 7. The code you are looking for is something like this:

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

and, of course, replacing [UIColor redColor] with whatever color you want.

like image 94
Simon Goldeen Avatar answered Oct 03 '22 21:10

Simon Goldeen