Problem with drawing image with CGContext on iOS 14

When I drag picture in my customed view, the picture starts jittering. The larger the zoom scale, the more the jitter.

I override draw function in UIView, then I use the CGContext to draw an CGImage in a CGRect. Very simple.

Code Block swift
ctx.draw(img, in: drawRect)

The drawRect updates everytime I drag or pinch the screen, so the image can move with finger.

Everything works well on iOS 13 and even iOS 14 beta.

Can anyone tell me what the problem is?


Anyone can offer me some help?
same issue... :((


Problem with drawing image with CGContext on iOS 14
 
 
Q