How to remove lookup & share from textview in Swift 3

Viewed 3071

I can remove cut, copy, paste, select, select all using this

override public func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool {
    if action == #selector(copy(_:)) || action == #selector(paste(_:)) || action == #selector(selectAll(_:)) || action == #selector(cut(_:))
    {
        return false
    }
    return super.canPerformAction(action, withSender: sender)
}

But I can't remove lookup & Share

enter image description here

Can anyone please suggest me how to remove this?

3 Answers
Related