how to create Custom UIMenuController with only custom items other than default?
问题 I have requirement to show menu items on uiwebview whenever user selects any text. I have tried let highlightMenuItem = UIMenuItem(title: "Highlight", action: #selector(ViewController.hightlight)) UIMenuController.sharedMenuController().menuItems = [highlightMenuItem] but this only appends more menu item with default existing one. as this Is there any way out to achieve this with only menu items Copy, Highlight and Note? 回答1: You can achieve this by subclassing UIWebView and overriding