Contents

defaultTextAttributes

The default attributes to apply to the text.

Declaration

var defaultTextAttributes: [NSAttributedString.Key : Any] { get set }

Discussion

By default, this property returns a dictionary of text attributes with default values.

Setting this property applies the specified attributes to the entire text of the text field. Unset attributes maintain their default values.

Getting this property returns the previously set attributes, which may have been modified by setting properties such as font and textColor.

See Also

Configuring the text attributes