tags:

views:

647

answers:

1

Hi there, I was wondering if UITextView can display rich text? I want to have simple formatting on my read only text (like different alignment for different parts of the text). if not, what view should I use?

+2  A: 

Generally, the best way to do this is to use a UIWebView and load local content in where you can insert tags and whatever else you need. Local loading should be fast and you can stylize it to look like any uitextview

Another option is to use a UILabel subclass instead and get the Three20 open-souce code. You want the TTStyledTextLabel.

coneybeare
can I generate the html on the fly and load it into the view?
Ali Shafai
yes, you can generate it and load it whenever you want, you just have to write the code that will generate the html string
coneybeare