Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transparent UIToolbar

I wrote the following code to make my toolbar transparent.

[mtoolbar setBackgroundColor:[UIColor clearColor]];

How do I make UIToolbar transparent?

like image 715
er.mobileapp Avatar asked Jun 06 '11 10:06

er.mobileapp


2 Answers

You can set the property translucent to YES and see if this helps.

like image 65
Luke Avatar answered Nov 01 '22 15:11

Luke


[self.toolbar setBackgroundImage:[UIImage new]
              forToolbarPosition:UIToolbarPositionAny
                      barMetrics:UIBarMetricsDefault];

[self.toolbar setBackgroundColor:[UIColor clearColor]];
like image 11
Ievgen Avatar answered Nov 01 '22 14:11

Ievgen