YYfim
YYfim

Reputation: 1412

Navigation Bar color and a View's color

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

Upvotes: 1

Views: 70

Answers (2)

Mohit
Mohit

Reputation: 516

You can try this one:--

navigationController.navigationBar.barTintColor = [UIColor greenColor];

or

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

Upvotes: 0

ricky3350
ricky3350

Reputation: 1738

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;

Upvotes: 1

Related Questions