I have a question, how can I get the url from webView ? I execute the following code and I get nil
The code I'm trying is:
override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(true) webView.loadRequest(URLRequest(url: URL(string: "https://www.youtube.com/watch?v=Vv2zJErQt84")!)) if let text = webView.request?.url?.absoluteString{ print(text) } }
swift swift3 nsurl uiwebview
Haider ahmed
source share