Disable link in UIWebView in appearance and function
- by Peter
Hello,
I wish to disable the href links on a UIWebView. First, I want the look of the link to change so the user doesn't think it is clickable. Second, I want the actual link to not be able to be tapped. I do not want to try webView:shouldStartLoadWithRequest:navigationType: since that not change the appearance of my links.
I found this answer:
Disabling visible links in UIWebView
But the above hasn't worked for me. This is my code:
NSString* s=[[NSString alloc] initWithFormat:@"for (a in document.getElementsByTagName(\"a\")) {a.href = \"\";}"];
[myWebView stringByEvaluatingJavaScriptFromString:s];
I've been working on this for hours, any suggestions are appreciated! Thanks!