开发者

How to set UIToolbar tint and maintain translucency like Black Translucent style?

开发者 https://www.devze.com 2022-12-24 02:29 出处:网络
I\'ve attempted to set the tint of my UIToolbar in IB, but that always causes the color of the toolbar to become solid.Adjusting the opacity of the color doesn\'t \"stick\".Changing the opacity of the

I've attempted to set the tint of my UIToolbar in IB, but that always causes the color of the toolbar to become solid. Adjusting the opacity of the color doesn't "stick". Changing the opacity of the toolbar itself is not the effect I'm looking for. What I'm really wanting to do is get the same effect as the Black Translucent style available in IB, but change the color. If I set the tintColor to a UIColor, it becomes non-transluc开发者_如何学Pythonent. Setting translucent to YES doesn't have any effect. What gives?


Change the alpha value to .6 in the UIColor you set it to. Check the docs for the method, I'm pretty sure you can use one with the alpha parameter during initilization.

0

精彩评论

暂无评论...
验证码 换一张
取 消