views:

87

answers:

1

I have a number of web views in my app in which I need to be careful about allowing further HTML links.

I disallow links in the delegate method shouldStartLoadWithRequest. This works fine, except for one thing. In the web view, the links are still highlighted in blue. So the user naturally thinks they are active links, but when selected, I disallow the link from the delegate method. This leads to confusion for the user.

Is there a way for me to disable the link color, so text does not show as blue when it contains a link within a UIWebView?

+1  A: 

Try injecting Javascript into the UIWebView to change the appearance of the links.

Removing the href from all anchors should clear the formatting.

Here's some Javascript to get you started if you need it:

for(a in document.getElementsByTagName("a")) { a.href= ""; }
Ben S
+1 dang you beat me to it.
Dave DeLong