What font does UIWebView and WKWebView use by default? I would like to be able to change that. But I don\'t want to do it in the html string, inste
You can use your UIFont object (so you can set it and modify more easily), but wrap the HTML in a span instead; font tags have been deprecated since HTML 4.01.
UIFont *font = [UIFont fontWithName:@"GothamRounded-Bold" size:14];
Assuming you already have the NSString *htmlString created, you can use the font's properties:
htmlString = [NSString stringWithFormat:@"%@",
font.fontName,
(int) font.pointSize,
htmlString];
Alternatively, you could just supply the values instead of using a UIFont object:
htmlString = [NSString stringWithFormat:@"%@",
@"GothamRounded-Bold",
14,
htmlString];