layoutManager(_:shouldBreakLineByWordBeforeCharacterAt:)
Asks the delegate whether to break the line at the specified word.
Declaration
optional func layoutManager(_ layoutManager: NSLayoutManager, shouldBreakLineByWordBeforeCharacterAt charIndex: Int) -> BoolParameters
- layoutManager:
The layout manager doing the layout.
- charIndex:
Index of the character delimiting the break point search.
Return Value
true if the current line break point is acceptable; false if the layout manager should find the next break point opportunity before charIndex.
See Also
Handling line fragments
layoutManager(_:shouldBreakLineByHyphenatingBeforeCharacterAt:)layoutManager(_:lineSpacingAfterGlyphAt:withProposedLineFragmentRect:)layoutManager(_:paragraphSpacingAfterGlyphAt:withProposedLineFragmentRect:)layoutManager(_:paragraphSpacingBeforeGlyphAt:withProposedLineFragmentRect:)layoutManager(_:boundingBoxForControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)layoutManager(_:shouldSetLineFragmentRect:lineFragmentUsedRect:baselineOffset:in:forGlyphRange:)