Instance Method


Sets the bounds and container for the extra line fragment.


iOS, Mac Catalyst, tvOS
- (void)setExtraLineFragmentRect:(CGRect)fragmentRect usedRect:(CGRect)usedRect textContainer:(NSTextContainer *)container;
- (void)setExtraLineFragmentRect:(NSRect)fragmentRect usedRect:(NSRect)usedRect textContainer:(NSTextContainer *)container;



The rectangle to set.


Indicates where the insertion point is drawn.


The text container where the rectangle is to be laid out.


The extra line fragment is used when the text backing ends with a hard line break or when the text backing is totally empty, to define the extra line which needs to be displayed at the end of the text. If the text backing is not empty and does not end with a hard line break, this should be set to NSZeroRect and nil.

Line fragment rectangles and line fragment used rectangles are always in container coordinates.

This method is used by the layout mechanism and should be invoked only during typesetting, in almost all cases only by the typesetter. For example, a custom typesetter might invoke it.

See Also

Setting Layout Information

- setAttachmentSize:forGlyphRange:

Sets the size to use when drawing a glyph that represents an attachment.

- setDrawsOutsideLineFragment:forGlyphAtIndex:

Specifies whether the given glyph exceeds the bounds of the line fragment on which it’s laid out.

- setLineFragmentRect:forGlyphRange:usedRect:

Associates the line fragment bounds for the specified range of glyphs.

- setLocation:forStartOfGlyphRange:

Sets the location for the first glyph in the specified range.

- setNotShownAttribute:forGlyphAtIndex:

Sets the visibility of the glyph at the specified index.