Instance Method


Sets the text’s color.


func setTextColor(_ color: UIColor?)



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


This method defines the default color of the entire string. The text field uses this color unless you explicitly override it in an attributed string using the foregroundColor attribute.

See Also

Setting the Text

func setText(String?)

Sets the text displayed by the text field.

func setAttributedText(NSAttributedString?)

Sets the styled text displayed by the text field.