简体   繁体   English

如何更改背景图像视图的透明度图像?

[英]How can I change the background image view transparency image?

It is the code: 它是代码:

self.view.backgroundColor= [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"yourimage.png"]];

My "yourimage.png" have some space that is transparency. 我的“ yourimage.png”有一些透明的空间。 But it shows me it becomes black. 但这告诉我它变成黑色。 How can I change it to show the transparency instead of black color? 如何更改显示透明度而不是黑色? thz. 谢谢

将视图上的opaque属性设置为NO

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM