UILabel lineBreakMode剪辑不剪辑文本 [英] UILabel lineBreakMode clip doesn't clip text

查看:118
本文介绍了UILabel lineBreakMode剪辑不剪辑文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个UILabel并且我已经将它的换行模式设置为剪辑,但是我没有看到......最后,它只是在文本溢出时截断/剪切文本。我需要设置代码的其他部分吗?

So I have a UILabel and I've set it's line break mode to clip, but I don't see the ... at the end, instead it just truncates/cut the text at the point where it overflows. Is there any other part of the code that I need to set?

以下是我的工作方式:

  [self.newsFeedHeadingTitle_ setLineBreakMode:UILineBreakModeClip];


推荐答案

如果你想要点,将它设置为UILineBreakModeTailTruncation在字符串的末尾。

Set it to "UILineBreakModeTailTruncation" if you want the dots at the end of the string.

这篇关于UILabel lineBreakMode剪辑不剪辑文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆