简体   繁体   中英

How to set transparent background color in UIImageView

I want to know how to set Transparent background Color in iOS. I have searched everywhere but I can't find anything. I want to set transparent background color like this:

图片

Set opaque to NO and alpha to 0.3, like this:

UIImageView *myImageView = ...
myImageView.opaque = NO;
myImageView.alpha = 0.3;

try this one it will works :-

Your_ImageView.opaque = NO;

Your_ImageView.alpha = 0.3;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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