Contents

NSTextContainer

A region where text layout occurs.

Declaration

class NSTextContainer

Overview

An NSLayoutManager uses NSTextContainer to determine where to break lines, lay out portions of text, and so on. An NSTextContainer object typically defines rectangular regions, but you can define exclusion paths inside the text container to create regions where text doesn’t flow. You can also subclass to create text containers with nonrectangular regions, such as circular regions, regions with holes in them, or regions that flow alongside graphics.

You can access instances of the NSTextContainer, NSLayoutManager, and NSTextStorage classes from threads other than the main thread as long as the app guarantees access from only one thread at a time.

Topics

Creating a text container

Managing text components

Defining the container shape

Constraining text layout

Deprecated

See Also

Layout