阅读背景:

如何使用省略号自动截断字边界上的UILabel?

来源:互联网 

I have a 1-line label that I want to truncate on word boundaries and add ellipsis (i.e. "The quick brown fox..." instead of "The quick brown fix jum...". Is there an easy way to achieve this? I've tried setting lineBreakMode to UILineBreakModeTailTruncation, UILineBreakModeWordWrap, and UILineBreakModeTailTruncation | UILineBreakModeWordWrap and none of these get the desired behavior. I've also tried their NSLineBreak... counterparts.I have a 1-line label that I want to truncate o




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: