简体   繁体   中英

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM