Instance Property

text

The current text that is displayed by the label.

Declaration

var text: String? { get set }

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

var attributedText: NSAttributedString?

The current styled text that is displayed by the label.

var font: UIFont!

The font used to display the text.

var textColor: UIColor!

The color of the text.

var textAlignment: NSTextAlignment

The technique to use for aligning the text.

var lineBreakMode: NSLineBreakMode

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

var isEnabled: Bool

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