Instance Method

initWithContainerSize:

Initializes a text container with a specified bounding rectangle.

Declaration

- (instancetype)initWithContainerSize:(NSSize)aContainerSize;

Parameters

aSize

The size of the text container's bounding rectangle.

Return Value

The newly initialized text container.

Discussion

The new text container must be added to an NSLayoutManager object before it can be used. The text container must also have an NSTextView object set for text to be displayed. This method is the designated initializer for the NSTextContainer class.

See Also

Deprecated

- lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect:

Overridden by subclasses to calculate and return the longest rectangle available in the proposed rectangle for displaying text, or NSZeroRect if there is none according to the receiver’s region definition.

Deprecated
- containsPoint:

Overridden by subclasses to return whether a point lies within the receiver’s region or on the region’s edge—not simply within its bounding rectangle.

Deprecated
containerSize

The size of the receiver’s bounding rectangle.

Deprecated