Contents

textAlignment

The technique for aligning the text.

Declaration

var textAlignment: NSTextAlignment { get set }

Discussion

This property applies to the entire text string. The default value of this property is NSTextAlignment.natural.

Assigning a new value to this property causes the new text alignment to be applied to the entire contents of the text view. If you want to apply the alignment to only a portion of the text, you must create a new attributed string with the desired style information and assign it to the attributedText property.

See Also

Configuring appearance attributes