When PKCanvasView is first drawn, existing drawing objects disappear.

When PKCanvasView is first drawn, existing drawing objects disappear.

PKDrawing, which previously had drawings saved with PKCanvasView, was saved as separate data or file.

After that, while creating a new PKCanvasView, I loaded the saved PKDrawing and reflected it in the new PKCanvasView. Below is the code.

canvasView!.drawing = draw!

Previously saved text or lines will be displayed normally.

However, when I draw with the pen for the first time (when I touch the screen with the pen), the old writing or lines disappear.

And after I leave a line or text, if I pan across the screen, the old text or line appears again.

If this phenomenon occurs and you touch the screen again with the fan, this phenomenon will no longer occur.

This phenomenon occurs the first time when a new PKCanvasView is declared and the previously saved PKDrawing is reflected.

Could you please help me with why this phenomenon occurs and how to improve it?

video link : https://drive.google.com/file/d/1Ck9fe4cl62WyUj-9_0gVFLdPr7Bx02e-/view?usp=sharing

Save the PKDrawing of PKCanvasView as separate data or file.
Run the app again, create a new PKCanvasView, and put the saved PKDrawing into the drawing variable of the just created PKCanvasView.
The moment you touch it for the first time, the previously drawn drawing disappears and appears again when you remove the touch from the screen. (See attached video)
When PKCanvasView is first drawn, existing drawing objects disappear.
 
 
Q