title: How to disable user selection in a WKWebView in Swift?
body: <p>I have developed an app which shows a web page using WKWebView in Swift. I need to disable the user selection and the callout (because the web loads a graph) and I don't find any way to do this with WKWebView.</p>
  
  <p>This is my code:</p>
  
  <pre><code>import UIKit
  import WebKit
  
  class ViewController: UIViewController, WKNavigationDelegate, WKUIDelegate {
  
      @IBOutlet weak var webView: WKWebView!
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          let url = URL(string: "https://danfg95glucose.azurewebsites.net")
          let request = URLRequest(url: url!)
          webView.navigationDelegate = self
          webView.load(request)
  
      }
  }
  </code></pre>
  
  <p>I want to do something similar with this but in Swift with WKWebView:</p>
  
  <pre><code>// Disable user selection
  [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitUserSelect='none';"];
  // Disable callout
  [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitTouchCallout='none';"];
  </code></pre>
  
  <p>Is it possible?</p>
  
  <p>This is a image showing the problem: </p>
  
  <p><a href="https://i.stack.imgur.com/cwOak.png" rel="noreferrer"><img src="https://i.stack.imgur.com/cwOak.png" alt="enter image description here"></a></p>
  
  <p>Thank you so much for your responses. And sorry for my level, I am new and I am learning programming. </p>