Removing Copy, Look Up, and Share from UIMenuController
问题 I am trying to override the default UIMenuController so that only my custom item "Define..." appears when the user selects text in its text view. I haven't had much luck with the approaches I've found online thus far. To be more specific, I have subclassed a UIViewController and used canPerformAction() to exclude all actions except my define method. override func becomeFirstResponder() -> Bool { return true } override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool