Error with CGImageCreateWithImageProvider

I use rendering in drawRect, but for the first time I always get an error:

<ON ERROR>: CGImageCreateWithImageProvider: Invalid image size: 768 x 768.

I draw an image with dimensions 768x500. The first time the image does not fit into the context, but the next time it draws.

What is it?

+3
source share

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


All Articles