UINavigationBar set tintcolor tested in iOS7 not working?

veereev picture veereev · Jun 11, 2013 · Viewed 34.7k times · Source

I have an app which have a UINavigationBar and I have set the tint color to black like this:

self.navigationController.navigationBar.tintColor = [UIColor blackColor];`

I have tested it in IOS 6 and it's black. However, it appears as the default navigation bar when I tried the same app in iOS 7.

As the title says, is it not working?

Answer

Hector Matos picture Hector Matos · Jun 11, 2013

You need to set the barTintColor property.

You can specify a custom tint color for the navigation bar background using the Tint (barTintColor) field. The default background tint color is white.

From iOS7 docs: https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/UIKitUICatalog/UINavigationBar.html#//apple_ref/doc/uid/TP40012857-UINavigationBar-SW1