How can I detect that a user has tapped a formatting button in a UIMenuController?
问题 My app allows users to format text in a UITextView by using some custom formatting buttons I've created. Now I want to enable the allowsEditingTextAttributes property of the text view so that users can copy and paste formatted text between text views. This enables the bold/italic/underline buttons in the standard UIMenuController for the text view. This is fine, but when users change the formatting through this menu, I need to call my custom method that updates the state of my custom