views:

71

answers:

1

Is it possible to make an NSString bold? If so, how? I am not using UILabel or UIIextView for some reason.

+2  A: 

NSStrings hold strings and no text formatting. I assume you could render an NSString using webkit; in that case the NSString will hold html content...

Janco
render NSString using webkit.?? i dont understand, iam sorry,, would u like to explain that clearly.??
Imam Arief W
I'm assuming you have a string @"Hello World" and you need a part of the string Bold. NSStrings have no capability to display themselves so you need code or a control to render the string or use a bit of code. Have webkist to render a string like @"Hello <b>World</b>"
Janco
One could also use an NSAttributedString instead of an NSString, and use Core Text to display it.
Peter Hosey
Note that NSAttributedString is only available in >4.0
Mr. Matt
yeah,, thnks guys.. simple way but wonderful result....
Imam Arief W