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?