我正在使用这行代码来设置文本的字体和大小.但这不起作用
NSString *abc=@"<html><body style=\"font-family:Verdana; font-size:12px; color:#000000;\"></body></html>"; [msgWebView setCustomTextEncodingName:abc];
请让我知道如何在WebView中设置文本的字体样式.
解决方法
我认为你是以错误的方式接近它.另一种方式是:
[[msgWebView preferences] setDefaultFontSize:12]; [[msgWebView preferences] setStandardFontFamily:@"Verdana"];