Transparent UIToolbar

前端 未结 7 960
鱼传尺愫
鱼传尺愫 2021-02-14 19:29

I wrote the following code to make my toolbar transparent.

[mtoolbar setBackgroundColor:[UIColor clearColor]];

How do I make UIToolbar

7条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-14 20:13

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

提交回复
热议问题