2

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?

byaruhaf
  • 4,128
  • 2
  • 32
  • 50
Lim Thye Chean
  • 8,704
  • 9
  • 49
  • 88

1 Answers1

7

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

canvasView.drawing = PKDrawing()
Jordan H
  • 52,571
  • 37
  • 201
  • 351