Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIToolbar incorrect colour in iOS7

When I set the bottom UIToolbar to black on the view controller, it appears as a more greyish colour (the same thing happens with other colours--it sort of fades them out). What I assume is happening is that in iOS7 the toolbar seems to adapt the colour of what is beneath it (currently white) which makes for the duller colour.

I've updated the view controller so that the "extended edges" options are turned off but still get this effect. Has anyone else had this issue yet?

UPDATE: I resolved the issue by setting the background colour of the UIToolbar to black (something I haven't had to do in previous versions of iOS). If anyone can think of a better solution, let me know.

like image 925
Kyle Bachan Avatar asked Sep 20 '13 00:09

Kyle Bachan


1 Answers

All tool- and navigation bars in iOS 7 have a translucent property.

This causes the effect, where the background shines through in blurred form (just like the control center).

Just set YourToolbar.translucent = NO;.

like image 177
Tim Bodeit Avatar answered Sep 21 '22 06:09

Tim Bodeit