How do I remove the context menu when a user taps a "tel:" link in a WkWebView on iOS?
I've tried to override the buildMenu in the WkWebView
, but i can't find the appropriate identifier.
override func buildMenu(with builder: UIMenuBuilder) {
// super.buildMenu(with: builder)
// List of system menu identifiers to remove
let menuIdentifiers: [UIMenu.Identifier] = [
.file,
.edit,
.view,
.window,
.help,
.format,
.toolbar,
.newScene,
.preferences,
.about,
.services,
.hide,
.quit,
.print,
.undoRedo,
.standardEdit,
.find,
.text,
.textStyle,
.writingDirection,
.substitutions,
.spelling,
.lookup,
.transformations,
.speech,
.share
]
// Remove each menu
for identifier in menuIdentifiers {
builder.remove(menu: identifier)
}
}
Thanks, Martin
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744224824a4563954.html
评论列表(0条)