If you have a PKCanvasView and call
canvasView.drawing.strokes.append(myNewStroke), it renders the UndoManager unusable, or at least makes it start fresh.
The undo buttons in the PKToolPicker will reflect what seems like an accurate number of undos (ie if I have 5 strokes I can tap undo 5 times before it's grayed out), but those undo presses won't actually do anything.
This presents an issue in our project as we're trying to remove a PKStroke if it looks like a circle and insert a new perfect circle, but when we do this we can't press undo to get rid of it.
Trying to hack together my own solution with .registerUndo causes a lot of issues also. I would be able to undo the things I'd specifically registered, but could no longer undo the rest of the strokes.
canvasView.drawing.strokes.append(myNewStroke), it renders the UndoManager unusable, or at least makes it start fresh.
The undo buttons in the PKToolPicker will reflect what seems like an accurate number of undos (ie if I have 5 strokes I can tap undo 5 times before it's grayed out), but those undo presses won't actually do anything.
This presents an issue in our project as we're trying to remove a PKStroke if it looks like a circle and insert a new perfect circle, but when we do this we can't press undo to get rid of it.
Trying to hack together my own solution with .registerUndo causes a lot of issues also. I would be able to undo the things I'd specifically registered, but could no longer undo the rest of the strokes.