UIToolbar incorrect colour in iOS7

Kyle Bachan picture Kyle Bachan · Sep 20, 2013 · Viewed 8.8k times · Source

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.

Answer

Tim Bodeit picture Tim Bodeit · Sep 20, 2013

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;.