Enumeration

NSParagraphStyle.LineBreakMode

Constants that specify what happens when a line is too long for its container.

Topics

Constants

case byWordWrapping

Wrapping occurs at word boundaries, unless the word itself doesn’t fit on a single line. See Characters and Grapheme Clusters in String Programming Guide for a discussion of issues related to determining word boundaries.

case byCharWrapping

Wrapping occurs before the first character that doesn’t fit.

case byClipping

Lines are simply not drawn past the edge of the text container.

case byTruncatingHead

The line is displayed so that the end fits in the container and the missing text at the beginning of the line is indicated by an ellipsis glyph. Although this mode works for multiline text, it is more often used for single line text.

case byTruncatingTail

The line is displayed so that the beginning fits in the container and the missing text at the end of the line is indicated by an ellipsis glyph. Although this mode works for multiline text, it is more often used for single line text.

case byTruncatingMiddle

The line is displayed so that the beginning and end fit in the container and the missing text in the middle is indicated by an ellipsis glyph. This mode is used for single-line layout; using it with multiline text truncates the text into a single line.