I am using the function (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
[webView loadHTMLString:sourceCode baseURL:nil];
to load so开发者_运维知识库me source-code I wrote, with links to internet content. For instance :
<a href="http://www.google.fr/" title="Links to google">Google</a>
The string load well, but there is no way to access the google link then. Do you know what I am doing wrong ? Is there anything to do with the baseURL ?
your webpage must return a string that just contain http://www.google.com. If you need to use the link, you must modify the NSString that you receive to extract the right url!
Try setting the dataDetectorType for your webview like this:
webView.dataDetectorTypes = UIDataDetectorTypeLink;
Hope this helps!
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论