Instance Property

defaultTextAttributes

The default attributes to apply to the text.

Declaration

@property(nonatomic, copy) NSDictionary<NSAttributedStringKey, id> *defaultTextAttributes;

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

Accessing the Text Attributes

text

The text displayed by the text field.

attributedText

The styled text displayed by the text field.

placeholder

The string that is displayed when there is no other text in the text field.

attributedPlaceholder

The styled string that is displayed when there is no other text in the text field.

font

The font of the text.

textColor

The color of the text.

textAlignment

The technique to use for aligning the text.

typingAttributes

The attributes to apply to new text being entered by the user.

UITextBorderStyle

The type of border drawn around the text field.