开发者

How to truncate tail in a two lines table cell programmatically on iOS

开发者 https://www.devze.com 2023-03-18 16:21 出处:网络
I have a a book names shown in a table view. The table view cells has 2 lines cell.textLabel.numberOfLines = 2 Now I want to t开发者_开发技巧runcate the tail of the second line. Is this possible to ac

I have a a book names shown in a table view. The table view cells has 2 lines cell.textLabel.numberOfLines = 2 Now I want to t开发者_开发技巧runcate the tail of the second line. Is this possible to achieve programmatically?


label.lineBreakMode = UILineBreakModeTailTruncation;

However, truncate tail is the default setting for UILabel objects.

For making this clear, please refer to the UILabel class reference

0

精彩评论

暂无评论...
验证码 换一张
取 消