开发者

Load string with Html tags

开发者 https://www.devze.com 2022-12-26 04:37 出处:网络
I am开发者_如何学运维 loading a string into UIwebview. The string is a simple text coming from Database. What I want is that webview should show the text in Bold. How to add HTML <b> tag or any

I am开发者_如何学运维 loading a string into UIwebview. The string is a simple text coming from Database. What I want is that webview should show the text in Bold. How to add HTML <b> tag or any tag to this simple text coming from Database ?


If you just want to wrap the whole string in <b></b>, you can do it like this:

NSString *wrappedString = [NSString stringWithFormat:@"<b>%@</b>", stringFromDatabase];
0

精彩评论

暂无评论...
验证码 换一张
取 消