我正在解析一个RSS源并在webview中显示它我使用图像视图将webview的背景颜色设置为黑色.解析后的数据存储在NSString中...我想要的是更改textcolor,fontsize,字符串数据的fonttype ..
self.itemTitle.text=[item objectForKey:@"title"];
[self.itemSummary loadHTMLString:[item objectForKey:@"description"] baseURL:nil];
[self.itemSummary setClipsToBounds:YES];
self.itemSummary.opaque=NO;
self.itemSummary.backgroundColor=[UIColor clearColor];
Run Code Online (Sandbox Code Playgroud)
[self.itemSummary loadHTMLString:[NSString stringWithFormat:@"<html><body bgcolor=\"#000000\" text=\"#FFFFFF\" face=\"Bookman Old Style, Book Antiqua, Garamond\" size=\"5\">%@</body></html>", [item objectForKey:@"description"]] baseURL: nil];
Run Code Online (Sandbox Code Playgroud)
您可以使用HTML颜色.
编辑:添加文字颜色.
编辑2:添加字体大小和面部