Instance Property


The amount by which text is inset within line fragment rectangles.


iOS, Mac Catalyst, tvOS
@property(nonatomic) CGFloat lineFragmentPadding;
@property CGFloat lineFragmentPadding;


The padding appears at the beginning and end of the line fragment rectangles. The layout manager uses this value to determine the layout width. The default value of this property is 5.0.

Line fragment padding is not designed to express text margins. Instead, you should use insets on your text view, adjust the paragraph margin attributes, or change the position of the text view within its superview.

See Also

Constraining Text Layout


The maximum number of lines that can be stored in the text container.

- lineFragmentRectForProposedRect:atIndex:writingDirection:remainingRect:

Returns the bounds of a line fragment rectangle inside the receiver for the proposed rectangle.


A Boolean that indicates whether the receiver’s region is a rectangle with no holes or gaps and whose edges are parallel to the text view's coordinate system axes.