Reputation: 632
I've got a couple of View Controllers that are added in the 'default Navigation Controller' of Xcode 5. I Want to change the color of the bar, but it doesn't work. This is the code I use:
[[UINavigationBar appearance] setTintColor:[UIColor redColor]];
This will only change the text in the navigation bar, not the background color. Can anybody point me in the right direction?
Upvotes: 8
Views: 5563
Reputation: 3607
Use this:
self.navigationController.navigationBar.barTintColor = [UIColor redColor];
self.navigationController.navigationBar.translucent = NO;
Upvotes: 15