Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 NSAttributedString 和/或 NSParagraphStyle 在 Xcode 中实现“断线”的缩进?请注意,它们在 Xcode 中获得了额外的缩进。
您可以为此使用 的headIndent属性。NSParagraphStyle您可能需要根据(逻辑)行的缩进宽度(制表符、空格)自己计算适当的缩进量。
headIndent
NSParagraphStyle