2

For most iOS widgets I can set the background color. It appears that UINavigationBar is not this way. Furthermore I cannot set the navigation item (top item)'s background as it does not respond to setBackgroundColor.

How can I change that color? Thanks.

3 Answers3

5

You should use setTintColor: instead:

[self.navigationController.navigationBar setTintColor:[UIColor redColor]];

Hope this helps!

superjessi
  • 1,790
  • 10
  • 17
3

Change it by following code:

self.navigationController.navigationBar.tintColor=[UIColor grayColor];
slezadav
  • 6,104
  • 7
  • 40
  • 61
user1770342
  • 151
  • 1
  • 2
0

Easiest way would be to use the Interface Builder:

UINavigationBar Properties

Tiquelou
  • 459
  • 5
  • 12