Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dantastic

macrumors 6502a
Original poster
Jan 21, 2011
572
678
I have a couple of uitableviews using bog standard uitableviewcells with a UITableViewCellStyleSubtitle style. This style should allow the text label to utilize the full width of the cell.

I have a few tables where the text is always being trimmed and then I've another table where it is all correct - the code is identical. I must have done something somewhere but I can't figure it out.

so the texts:
Code:
// set in cell.textLabel.text = @"<...>";
This is a longer text message
short text
turns into:
Code:
This is a longer text messa..
short t...

If I change the style of the cell to UITableViewCellStyleDefault the text isn't being trimmed.
Only some tables are affected but I have been checking around and I can't seem to find what the problem is...
 

dantastic

macrumors 6502a
Original poster
Jan 21, 2011
572
678
ok, I've to learn to sanitize my inputs a bit better.
turned out that the string I was feeding the textLabel has a newLine character i it. stripping the new-lines and the cells look right.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.