Contents

setTextColor(_:)

Sets the color to apply to plain text strings.

Declaration

func setTextColor(_ color: UIColor?)

Parameters

  • color:

    The custom color to be applied to the label’s text. Specifying nil removes the custom color and returns the text to the color specified in the storyboard file. The default label color is white.

Mentioned in

Discussion

The value set by this method represents the default color applied to text. This color is used unless you explicitly override it in an attributed string using the NSForegroundColorAttributeName attribute.

See Also

Setting the Label Text