Swift PKLassoTool custom menu

I’m building a drawing app and I want to add more things I can do with the strokes selected by the PKLassoTool. Is there a way to edit the menu of buttons that appears when you make a selection with the lasso tool? And then is there away to pass the selected strokes into a function?

I’ve looked at the Apple documentation but there doesn’t seem to be a lot of support to doing anything with the lasso tool.

Would love to have a way of getting the strokes selected by PKLassoTool too, its kind of a core feature imo.

https://stackoverflow.com/questions/71583115/pkcanvasview-pkdrawing-get-strokes-selected-by-lasso This stack overflow post will get the slected strokes, however, it breaks the undo stack and it still doesn't answer my quiestion of getting a custom menu for the PKLassoTool

Swift PKLassoTool custom menu
 
 
Q