ios - Remove items from UIMenuController using Swift -


i want know how 2 things:

  1. remove uimenucontroller entirely. want text in wkwebview selected, uimenucontroller causing issues when long press released.

    1. add new items list of menu items, , remove others.

right can add item end of list, nothing else, using following code.

func enablecustommenu() {     let lookup = uimenuitem(title: "add comment", action: "addcomment")      uimenucontroller.sharedmenucontroller().menuitems = [lookup] }  func disablecustommenu() {     uimenucontroller.sharedmenucontroller().menuitems = nil }  func addcomment() {     //let text = self.webview.("window.getselection().tostring();")     print("add comment") } 


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -