Search code examples
iosios7xcode5back-button

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


Solution

  • 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.