Clear background color in UIImageView?

Hi, I have a UIimageView with a PNG image with round corners, the image is clearly visible, the only problem is that I see UIImage Corners on a white background, how can I make the background transparent and transparent.

+3
source share
2 answers

Try the following:

imageView.backgroundColor = [UIColor clearColor];
imageView.opaque = NO;

You can achieve the same in IB by setting the Background to a color with 0% opacity and unchecking the Opaque box.

+8
source

try

imageView.backgroundColor = [UIColor clearColor];
+3
source

Source: https://habr.com/ru/post/1741541/


All Articles