0

I use this IBAction below but I get some errors. How can I make it work efficiently?

 @IBAction func fingerOrPencil (_ sender: Any) {
        canvasView.allowsFingerDrawing.toggle()
        pencilButton.title = canvasView.allowsFingerDrawing ? "Finger" : "Pencil"

these are the errors

allowsFingerDrawing' was deprecated in iOS 14.0: Use 'drawingPolicy' property.

actually I used drawingPolicy method inside viewDidLoad as

canvasView.drawingPolicy = .anyInput

but how can I use this inside IBAction to be able to toggle?

asduskun
  • 17
  • 5

0 Answers0