Contents

glyphRange(for:)

Returns the range of glyphs lying within the specified text container.

Declaration

func glyphRange(for container: NSTextContainer) -> NSRange

Discussion

This is a less efficient method than the similar textContainer(forGlyphAt:effectiveRange:).

Performs glyph generation and layout if needed.

See Also

Performing advanced layout queries