mindfreak
mindfreak

Reputation: 1

Load string with Html tags

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 ?

Upvotes: 0

Views: 370

Answers (1)

cduhn
cduhn

Reputation: 17918

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];

Upvotes: 1

Related Questions