I am making an app which has a section for latest company news. Basically the plan was initially to use ASIHTTPRequest to extract all the HTML, search through it for tags t
OK, setting the UIDataDetectorTypeNone for dataDetectorTypes, should prevent the webview from detecting the links, this is correct.
Furthermore using the
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
UIWebview delegate, you can simply return NO for the URL's you don't want the user to allow following...
Furthermore, you can insert custom CSS Rules, after the page has finished loading in the
- (void)webViewDidFinishLoad:(UIWebView *)webView
delegate method, this way:
[MywebView stringByEvaluatingJavaScriptFromString:@"document.styleSheets[0].addRule(\"a.link\", \"color:#FF0000\")"];
So based on the CSS from the thread I mentioned, this should work:
[MywebView stringByEvaluatingJavaScriptFromString:@"document.styleSheets[0].addRule(\".active\", \"pointer-events: none;\");document.styleSheets[0].addRule(\".active\", \"cursor: default;\")"];