I want to record the user's behavior on a UITextViewer. Specifically, I want to programmatically capture when the user tapped text menu functions such as copy, cut, translate, select all, look up.
This question (How can I detect that a user has tapped a formatting button in a UIMenuController?) seems to be the closest one, but I want to know the code for Swfit instead of Object-c.
How can I observe when the user tapped a specific text menu? I would also like to know which words were selected when a specific menu was called.