title: WKWebView delegate method changes
body: <p>I am working on migrating UIWebView to WKWebView. I have changed all the Delegate methods. I need WKWebView delegate methods equal to below UIWebView delegate method.</p>
  
  <p>I have written below method in UIWebView. Help me to change below code into WKWebView</p>
  
  <pre><code>func webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType: UIWebViewNavigationType) -&gt; Bool {
  
      guard let url = request.url else {
         return true
      }
  
      guard !url.absoluteString.contains("data:application/pdf") else {
          navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.action,
                                                              target: self,
                                                              action: #selector(share(sender:)))
          return true
      }
  
      guard url.pathExtension != "pdf" else {
          let safariVC = SFSafariViewController(url: url)
          safariVC.modalPresentationStyle = .popover
          present(safariVC, animated: true, completion: nil)
          return false
      }
  
      guard url.isLogin() == false else {
          AppDelegate.navigationController.signOut(.sessionOnly)
          return false
      }
  
      guard let mobileSite = url.asMobileSite() else {
          return true
      }
  
      let mobileRedirect = URLRequest(url: mobileSite)
      webView.loadRequest(mobileRedirect)
      return false
  
  }
  </code></pre>