Reputation: 15639
I am getting NSString as
<a href="http://www.googel.com.com/index.php?route=common/search" target="_blank">click here</a>
In UIWebView, it looks like blue color.
I either want to remove blue color or simply remove this TAG.
I removed link check from XIB Attribute Inspector, but it only detects as
www.google.com
How can I do it.
Thanks
Upvotes: 1
Views: 775
Reputation: 971
solution 1: Remove anchor text color
Append following to the string received
a:link, a:hover, a:active { color: black; }
Solution 2: remove Anchor tag
for this you can write (or can search on google) Regex for removeing anchor tag
Upvotes: 0
Reputation: 13783
On iOS 7 you can set the tintColor of UIWebView. It affects the datadetector link color:
[yourWebView setTintColor:[UIColor blackColor]];
So you can make it the same color as your text.
Upvotes: 1
Reputation: 2813
If you get a NSString with html content you can always append a html script tag to the original html and use css to style your content any way you like.
Upvotes: 0