Contents

usedRect(for:)

Returns the bounding rectangle for the glyphs in the specified text container.

Declaration

func usedRect(for container: NSTextContainer) -> CGRect

Discussion

Returns the text container’s currently used area, which determines the size that the view would need to be in order to display all the glyphs that are currently laid out in the container. This causes neither glyph generation nor layout.

Used rectangles are always in container coordinates.

See Also

Related Documentation

Managing the text containers