NSMutableAttributedString paragraphStyle不适用

时间:2018-04-08 16:10:01

标签: ios swift nsmutableattributedstring catextlayer

我已经向CATextLayer添加了一个NSMutableAttributedString。除了paragraphStyle之外,所有属性都适用。有什么想法吗?

感谢您的帮助。

npm run dev

1 个答案:

答案 0 :(得分:0)

AFAIK CATextLayer不尊重任何段落风格。您需要一个UITextView来显示带有段落样式的文本。

修改

我想你想要

paragraphStyle.tailIndent = -10

负值表示距尾随边距的距离。