Perhaps create class that subclasses PKCanvasView, and intercept the touch events and do a hit test on your button?
Post
Replies
Boosts
Views
Activity
I've filed a radar for this (FB7794075), but I've discovered a workaround in the mean time:
self.undoManager?.groupsByEvent = false
self.drawing.strokes.append(YOURCUSTOMPKSTROKE)
for (index, _) in self.drawing.strokes.enumerated() {
self.undoManager?.beginUndoGrouping()
self.undoManager?.registerUndo(withTarget: self, handler: {
$0.drawing.strokes.remove(at: index)
})
self.undoManager?.endUndoGrouping()
}
self.undoManager?.groupsByEvent = true
The accepted suggestion does not work for me. Anyone got any ideas?
Did you ever figure this out?
Did you figure this one out ever? I'm facing the same issue :(