Instance Property

size

The size of the text container’s bounding rectangle.

Declaration

iOS, Mac Catalyst, tvOS
var size: CGSize { get set }
macOS
var size: NSSize { get set }

Discussion

This property defines the maximum size for the layout area returned from lineFragmentRect(forProposedRect:at:writingDirection:remaining:). A value of 0.0 or less means no limitation.

The default value of this property is CGSizeZero.

See Also

Defining the Container Shape

var exclusionPaths: [UIBezierPath]

An array of path objects representing the regions where text is not displayed in the text container.

var lineBreakMode: NSLineBreakMode

The behavior of the last line inside the text container.

var containerSize: NSSize

The size of the receiver’s bounding rectangle.

Deprecated
var widthTracksTextView: Bool

A Boolean that controls whether the receiver adjusts the width of its bounding rectangle when its text view is resized.

var heightTracksTextView: Bool

A Boolean that controls whether the receiver adjusts the height of its bounding rectangle when its text view is resized.