Instance Property

text

The text that the label is displaying.

Declaration

@property(nonatomic, copy) NSString *text;

Discussion

This property is nil by default. Assigning a new value to this property also replaces the value of the attributedText property with the same text, although without any inherent style attributes. Instead the label styles the new string using shadowColor, textAlignment, and other style-related properties of the class.

See Also

Accessing the Text Attributes

attributedText

The styled text displayed in the label.

font

The font used to display the text.

textColor

The color of the text.

textAlignment

The technique to use for aligning the text.

lineBreakMode

The technique to use for wrapping and truncating the label’s text.

enabled

The enabled state to use when drawing the label’s text.

enablesMarqueeWhenAncestorFocused

A Boolean value that determines whether the label scrolls its text while one of its containing views has focus.