Custom cell label wont wordwrap

Go To


I created a custom UITableViewCell which is the same as the Left Detail cell but instead of a detailLabel it has a UITextField I matched ALL properties between the label in my custom cell and the label for the Left Detail cell however it will not word wrap. It will display the first word then instead of wrapping it just cuts the rest off without truncating. I am guessing that it is word wrapping but instead of making the label height bigger it is keep it the same as a one line label.

I have

  • label lines set to 0
  • line breaks set to word wrap
  • View autosizing set to the same as Left Detail

I did this in IB so I was able to match every setting. Anyone know how to make the custom labels for cells auto wrap?


To be clear I am wanting the custom label to word wrap not the textfield.

2012-04-04 20:26
by Bot


I ended up making the label the size of the cell instead of being static. This allowed it to wrap.

2012-04-28 18:24
by Bot


UITextField is one line only. Perhaps you mean UITextView? Review the Apple documentation on both classes. I have used a UITextView with multiline successfully in a UITableViewCell.

2012-04-04 21:11
by Sam
Sorry if you were confused by I stated above the label is not wrapping - Bot 2012-04-04 21:30