Oh Danny Boy
Oh Danny Boy

Reputation: 4887

UITableView cell text is cut off

I am having a problem with the UITableview cell cutting off strings whose characters are more than 12 chars. Any ideas why this would occur? I have not made a custom cell at all. I cannot find any solution to this problem through a Google search. Any ideas?

Upvotes: 5

Views: 4907

Answers (2)

iwasrobbed
iwasrobbed

Reputation: 46703

You should be able to set the label properties to re-size the font based on the label's contents using adjustsFontSizeToFitWidth. This will essentially decrease the font size to make the text fit all on one line.

Upvotes: 7

jer
jer

Reputation: 20236

Your cell likely contains a label, which in turn is set to given bounds. What you need to do is ensure that your label is the same size as your longest string, or bigger than it.

Upvotes: 2

Related Questions