Contents

font

The font of the text.

Declaration

var font: UIFont? { get set }

Discussion

This property applies to the entire text of the text field. It also applies to the placeholder text. The default value of this property is the body style of the system font.

Assigning a new value to this property causes the font to be applied to the entire string in the attributedText and attributedPlaceholder properties. If you want to apply the font to only a portion of the text, create a new attributed string with the desired style information and associate it with the text field.

See Also

Configuring the text attributes