1
votes

I'm getting a weird, i have a navigation bar and a view that is right under it.

I set both of them to [UIColor BlueColor], but at run time the outcome is that the nav bar has a slit darker color then the view.

Any knows what causes this? Thanks

2

2 Answers

1
votes

Your problem is that the navigation bar is translucent, and therefore the bar color is put on top of the view's color, making it appear darker. Try making the bar not translucent.

navigationBar.translucent = NO;

0
votes

You can try this one:--

navigationController.navigationBar.barTintColor = [UIColor greenColor];

or

[[UINavigationBar appearance] setBarTintColor:[UIColor greenColor]];