How do I change the Navigation Bar color in iOS 7?
Basically I want to achieve something like the Twitter Nav Bar (updated Twitter for iOS7
that is). I embedded-in a nav bar atop a view controller
. All I want is to change the nav bar color to light blue along with the utility bar at the top. I can't seem to find an option in my storyboard
.
For swift change navigation bar color:
change title font,size, color:
To make Rajneesh071's code complete, you may also want to set the navigation bar's title color (and font, if you want) since the default behavior changed from iOS 6 to 7:
If you want to use a hex code, here is the best way to do so.
First, define this at the top of your class:
Then inside the "application didFinishLaunchingWithOptions", put this:
Put you hex code in place of the 00b0f0.
In a navigation based application you can change color
The behavior of
tintColor
for bars has changed in iOS 7.0. It no longer affects the bar's background.From the documentation:
barTintColor Class Reference
The tint color to apply to the navigation bar background.
Discussion
This color is made translucent by default unless you set the translucent property to
NO
.Availability
Available in iOS 7.0 and later.
Declared In
UINavigationBar.h
Code
We can also use this to check iOS Version as mention in iOS 7 UI Transition Guide
EDIT Using xib