layoutCharacters(in:for:maximumNumberOfLineFragments:)
Lays out characters in the given character range for the specified layout manager.
Declaration
func layoutCharacters(in characterRange: NSRange, for layoutManager: NSLayoutManager, maximumNumberOfLineFragments maxNumLines: Int) -> NSRangeParameters
- characterRange:
The range of the characters to lay out.
- layoutManager:
The layout manager that does the drawing.
- maxNumLines:
The maximum number of line fragments to lay out. Specify
NSUIntegerMaxfor unlimited number of line fragments.
Return Value
The method returns the actual character range that the receiving NSTypesetter processed.
Discussion
The layout process can be interrupted when the number of line fragments exceeds maxNumLines.