Contents

attributedText

The styled text that the label displays.

Declaration

@NSCopying var attributedText: NSAttributedString? { get set }

Discussion

This property is nil by default.

Assigning a new value to this property also replaces the value of the text property with the same string data, although without any formatting information. In addition, assigning a new value updates the values in the font, textColor, and other style-related properties so that they reflect the style information starting at location 0 in the attributed string.

Turn autokerning on for the label by setting the NSKernAttributeName of the string to null.

See Also

Accessing the text attributes