alexeypro
alexeypro

Reputation: 3673

IPHONE: For UITableViewCell - how do I break lines for the NSString to make it fit?

I have the next problem. In one of the cells (UITableViewCell) I need to show quite a long string. I am trying to break it in lines (adding \n) between words, but it does not seem to help (to be precise -- the string has \n, but it still shows like "My long string very..." in the cell) How do I do this properly?

Upvotes: 1

Views: 363

Answers (1)

Jacob Relkin
Jacob Relkin

Reputation: 163238

your_cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;

Upvotes: 2

Related Questions