I initialize the func webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType: UIWebViewNavigationType) -> Bool method of func webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType: UIWebViewNavigationType) -> Bool Tell me how to do? Under the pouch devices I just started coding.

  • Not sure, but try something like request.url to get the url and then url.path to get the string from the url. - Vitali Eller

1 answer 1

The problem was solved, let webUrl = request.url?.absoluteString