Instance Method

insertTextContainer:atIndex:

Inserts the given text container into the series of text containers at the given index.

Declaration

- (void)insertTextContainer:(NSTextContainer *)container atIndex:(NSUInteger)index;

Parameters

aTextContainer

The text container to insert.

index

The index in the series of text containers at which to insert aTextContainer.

Discussion

This method invalidates layout for all subsequent NSTextContainer objects, and invalidates glyph information as needed.

See Also

Managing the Text Containers

textContainers

The receiver’s text containers.

- addTextContainer:

Appends the given text container to the series of text containers where the receiver arranges text.

- removeTextContainerAtIndex:

Removes the text container at the given index and invalidates the layout as needed.

- setTextContainer:forGlyphRange:

Sets text container where the glyphs in the given range are laid out.

- textContainerChangedGeometry:

Invalidates the layout information, and possibly glyphs, for the given text container and all subsequent NSTextContainer objects.

- textContainerChangedTextView:

Updates information needed to manage NSTextView objects in the given text container.

- textContainerForGlyphAtIndex:effectiveRange:

Returns the container in which the given glyph is laid out and (optionally) by reference the whole range of glyphs that are in that container.

- textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:

Returns the container in which the given glyph is laid out and (optionally) by reference the whole range of glyphs that are in that container.

- usedRectForTextContainer:

Returns the bounding rectangle for the glyphs laid out in the given text container.