Instance Method

ensureLayout(forBoundingRect:in:)

Forces the receiver to perform layout for the specified area in the specified text container, if it has not already done so.

Declaration

iOS, Mac Catalyst, tvOS
func ensureLayout(forBoundingRect bounds: CGRect, in container: NSTextContainer)
macOS
func ensureLayout(forBoundingRect bounds: NSRect, in container: NSTextContainer)

Parameters

bounds

The area for which layout is performed.

container

The text container containing the area for which layout is performed.

Discussion

The layout manager reserves the right to perform layout for larger ranges. If noncontiguous layout is disabled, then the affected range is always effectively extended to start at the beginning of the text.

See Also

Causing Glyph Generation and Layout

func ensureGlyphs(forCharacterRange: NSRange)

Forces the receiver to generate glyphs for the specified character range, if it has not already done so.

func ensureGlyphs(forGlyphRange: NSRange)

Forces the receiver to generate glyphs for the specified glyph range, if it has not already done so.

func ensureLayout(forCharacterRange: NSRange)

Forces the receiver to perform layout for the specified character range, if it has not already done so.

func ensureLayout(forGlyphRange: NSRange)

Forces the receiver to perform layout for the specified glyph range, if it has not already done so.

func ensureLayout(for: NSTextContainer)

Forces the receiver to perform layout for the specified text container, if it has not already done so.

var glyphGenerator: NSGlyphGenerator

The glyph generator used by this layout manager.