Question

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?

Was it helpful?

Solution

Use this:

    self.navigationController.navigationBar.barTintColor = [UIColor redColor];
    self.navigationController.navigationBar.translucent = NO;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top