How to retrieve the current URL from a UIWebView

To read out the URL of what a Web View is currently displaying we can use this method:

    NSURL *myURL = [[NSURL alloc]init];
    myURL = self.myWebView.request.URL.absoluteURL;

Or, if we’d like to retrieve this as a string:

    myString = self.myWebView.request.URL.absoluteString;




Leave a Reply