Following code can be used to change the font and size of UIWebView displayed from HTML string. To implement this first change the font and size of HTML string then load the UIWebView with this string like below.
UIFont *font = [UIFont fontWithName:@"OpenSans" size:12];
NSString *htmlString = [NSString stringWithFormat:@"<span style=\"font-family: %@; font-size: %i\">%@</span>",font.fontName, (int) font.pointSize, yourHTMLString];
[webViewObject loadHTMLString:htmlString baseURL:nil];
0 Comment(s)