Transparent color works on the simulator, but turns black on the iPhone

I am trying to make an image with several transparent areas. I upload an image using

image = [UIImage imageNamed:@"testimage.png"];

and draw it using

[image drawAtPoint:CGPointMake(0,0)];

The UIView on which I draw the image is not opaque (and has a transparent background color).

The problem is that everything works fine on the simulator, but when I run the application on my iPhone, the transparent color turns black! Can anyone spot my mistake?

+3
source share
3 answers

- .PNG, . PNG-8, , , . .PNG, 24- , .

.

  • EDIT: , PNG "-", . 24- .
+2

. GraphicConverter.

, - . GraphicConverter, , Picture = > Alpha Channel = > Create Alpha Channel . , , .

, .

+3

I solved the problem by loading it into colorync and then saving it.

0
source

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


All Articles