Removing content in PencilKit

Viewed 1852

When using PencilKit in iOS 13/iPadOS, how do you remove all content from the screen, or remove those content selected (via lasso)?

I can't find any functions in PKDrawing or PKCanvasView that do these?

1 Answers

You can clear the drawing on the PKCanvasView by simply setting the drawing property equal to a new empty PKDrawing.

canvasView.drawing = PKDrawing()
Related