Contents

shouldBreakLine(byWordBeforeCharacterAt:)

Breaks a line by word-wrapping before the character at the specified index.

Declaration

func shouldBreakLine(byWordBeforeCharacterAt charIndex: Int) -> Bool

Discussion

The typesetter calls this method, if implemented by a subclass, before breaking a line by word-wrapping before the character at the given character index, enabling the subclass to control line breaking. A subclass can override this method to customize the text layout process. If the method returns false, the typesetter continues looking for a break point.

See Also

Laying Out Glyphs