tags:

views:

662

answers:

3

How to wrap texts in UITableViewcell on iPhone?

+1  A: 

Have you looked at the lineBreakMode property on UITableViewCell?

lineBreakMode

The mode for for wrapping and truncating text in the cell. (Deprecated. Instead set the line-break mode attribute of the UILabel objects assigned to the textLabel and detailTextLabel properties.)

@property(nonatomic) UILineBreakMode lineBreakMode

Discussion

For further information, see the UILineBreakMode constants described in NSString UIKit Additions Reference. The default value is UILineBreakModeTailTruncation.

Jasarien
A: 

You would also need to set the number of lines for the text label.

Example

[cell.textLabel setNumberOfLines:2];
geekydevjoe
+1  A: 

See this question.

Ian Henry