To read out the URL of what a Web View is currently displaying we can use this method:
1 2 |
NSURL *myURL = [[NSURL alloc]init]; myURL = self.myWebView.request.URL.absoluteURL; |
Or, if we’d like to retrieve this as a string:
1 |
myString = self.myWebView.request.URL.absoluteString; |