How to use paragraph text in uitableviewcell in cocoa -touch

I am using uiLabels to place text in tableviews cells. I now want to use paragraph text that returns the caret to the next line rather than going beyond the boundaries of a table cell. Can I do this by manipulating the uiLabel or would I use another control together like a text view.

Also are there any sample projects that implement this?

Thanks Joe

0


a source to share


2 answers


The easiest way is to use UILabel and set the line count in IB to> 1 and then set the line break to "Word Wrap."

Another way is to use a UITextView, load the data, and set it to "disabled" so it won't be editable.



Finally, you can always go down the UIWebView route and load it with rich HTML, complete with line breaks, etc. Quite heavy, but most flexible.

+1


a source


The easiest way is to use UILabel, maybe. The only alternative would be to create a custom UIView subclass that draws text directly, but this will give you the ultimate benefit.



0


a source







All Articles