How to set up a transparent png image in iOS?

I have a transparent png image with a white background. Is there still a shade of the transparent part? I tried many times, but I can only shade the white background, not the transparent part. Thanks for the help.

Update: Thank you very much zsnow.I laid down the preview under UIImageView. Then I set the color for the preview. Fought, everything is in order.

+4
source share
1 answer

Create a UIView behind the UIImageView that you are using and set the background color of the view to the desired hue color and set the background color of the image to be transparent.

 tintView.backgroundColor = <desired tint color>; imageView.backgroundColor = UIColor.clearColor 
+2
source

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


All Articles