iPhone – UIWebview – Get the URL of the link clicked

Implement this in your UIWebViewDelegate class

- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {
    //CAPTURE USER LINK-CLICK.
      NSURL *url = [request URL];
      yourTextBox.text =   [url absoluteString];


      return YES;   
}

Leave a Comment