Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ios7 toolbar color washed out

Tags:

ios7

uitoolbar

In iOS 7, if I set the toolbar background color, it uses a washed out version of the color, not the actual color. At first I thought maybe the toolbar was semi-transparent (not fully opaque) but that doesn't appear to be the problem.

Even using black only give me a light grey color.

[topToolbar setBackgroundColor:[UIColor blackColor]];

I also tried:

[topToolbar setTranslucent:NO];

But that just caused my toolbar color to be ignored completely.

Anybody know how to make it just use the color specified, without any weirdness?

Thanks.

like image 556
Casey Perkins Avatar asked Dec 19 '22 23:12

Casey Perkins


1 Answers

I wasn't aware of the setBarTintColor method previously, but it is what is needed to accomplish this.

[topToolbar setBarTintColor:[UIColor blackColor]];
[topToolbar setTranslucent:NO];
like image 82
Casey Perkins Avatar answered Jan 04 '23 06:01

Casey Perkins