如果NSAttributedString设置了行高,自动收缩功能将无法正常工作

时间:2019-02-14 12:53:48

标签: swift nsattributedstring autoshrink

我有带属性文本的UILabel,我增加了行高。 然后我想添加自动收缩。结果,我得到的一行文本具有缩小的字体,而不是三行。

如果添加线高,自动收缩功能将无法正常工作。 还是有其他解决方案?谢谢

let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.minimumLineHeight = lineHeight

0 个答案:

没有答案