简体   繁体   English

如何使UIImageView中的图像像素透明?

[英]How to make image pixels in UIImageView be transparent?

I have Image.png ( it has some transparent pixels ) in ImageView, but when i run my app on device, pixels on my Image are not transparent (i dont see anything below image, i see just gray color in this places). 我在ImageView中有Image.png( 它有一些透明的像素 ),但是当我在设备上运行我的应用程序时,我的图像上的 像素 不是透明的 (我在图像下方看不到任何东西,在这个地方只能看到灰色)。 Have anybody know can I make it work? 有人知道我可以使它工作吗?

使用以下方法更改UIImageView的背景色以清除颜色:

imageView.backgroundColor = [UIColor clearColor];

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

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