I have a string text string that can contain a web link . I load it into a UIWebView using loadHTMLString and notice that, for example, the font style and size are incorrect. I can't find anything else, so I am inserting text inside an ad hoc HTML document using CSS (this is REALLY the only way):
NSString *myHtml = [NSString stringWithFormat: @"<html><head>" "<style type=\"text/css\">" "body{" "font-family: Helvetica;" "font-size: 20px;" "a {color: #FFF;}" "},</style>" "</head><body>%@</body></html>", myText]; [self.myWebView loadHTMLString:myHtml baseURL:nil];
Problem: I just canβt figure out how to change the link style . I tried {color: #fff;}, *: link {color: #fff;} etc., which they donβt even remember. Nothing has changed regarding the default look of links! Not color, not size, not background, nothing!
Any tips on how to have any control over how the links look? Will using javaScript be the only option?
source share