How do I set the navigation bar to a custom color (e.g. dark green) ?
I know how to change the navigation bar to primary colors like green and red, using code like this:
UINavigationBar *bar = [self.navigationController navigationBar];
[bar setTintColor:[UIColor redColor]];
Thanks.
A user changes the navigation bar's style, or UIBarStyle , by tapping the “Style” button to the left of the main page. This button opens an action sheet where users can change the background's appearance to default, black-opaque, or black- translucent.
From Settings, tap Display, and then tap Navigation bar. Make sure Buttons is selected, and then you can choose your desired button setup at the bottom of the screen. Note: This option will also affect the location you swipe when using Swipe gestures.
And to change the tint of the navigation bar background :
[self.navBar setBarTintColor:[UIColor colorWithRed:0.701 green:0.926 blue:0.000 alpha:1.000]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With