Instance Property


The font of the text.


@property(nonatomic, strong) UIFont *font;


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

Accessing the Text Attributes


The text displayed by the text field.


The styled text displayed by the text field.


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


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


The default attributes to apply to the text.


The color of the text.


The technique to use for aligning the text.


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


The type of border drawn around the text field.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software