How to retrieve the current URL from a UIWebView

- by

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;


If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.