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
2009-09-17 05:34:24
can I generate the html on the fly and load it into the view?
Ali Shafai
2009-09-17 05:37:11
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
2009-09-17 05:38:49