Instance Method

initWithFrame:textContainer:

Initializes a text view.

Declaration

- (instancetype)initWithFrame:(NSRect)frameRect textContainer:(NSTextContainer *)container;

Parameters

frameRect

The frame rectangle of the text view.

aTextContainer

The text container of the text view.

Return Value

An initialized text view.

Discussion

This method is the designated initializer for NSTextView objects.

Unlike initWithFrame:, which builds up an entire group of text-handling objects, you use this method after you’ve created the other components of the text-handling system—a text storage object, a layout manager, and a text container. Assembling the components in this fashion means that the text storage, not the text view, is the principal owner of the component objects.

See Also

Initializing

- initWithFrame:

Initializes a text view.