iphone - How to get the url that UIWebView is loading? -


In my web view, when the user clicks on a link within the webview, where is that property? I looked at the documents and tried things like

  [webView.request.URL description] webView.request.URL.absoluteURL or absoluteString   

And everything is empty thanks!

Representative function such as implementation

  - (BOOL) webview: ( UIWebView *) webView should startLoadWithRequest: (NSURLRequest *) Request Navigation Type: (UIWebViewNavigationType) Navigation Type {if (type Navigation == UIWebViewNavigationTypeLinkClicked) {// Its loaded webpage NSString * strLink = [[Request URL] Click on link absoluteString]; // clicked link url} return yes; // If you allow the page to return more, then YES returns   

Hope it helps you.

Comments