Working with UITextView
//...
txtView.isFindInteractionEnabled = true
//...
My code:
override func buildMenu(with builder: UIMenuBuilder) {
if #available(iOS 16.0, *) {
builder.remove(menu: .lookup)
}
super.buildMenu(with: builder)
}
This will remove: Find selection, look up, translate, search web.
I want to keep only the option: "Find selection" and remove the others "look up, translate, search web"
2
Answers
Instead of removing the whole menu you can remove specific child elements from it.
_define:
action contains both the elements Look up and Search web.