Adds support for using setting the attributedText property of the UITextField.
Setting this value was always possible of course, but the logic of SkyFloatingLabelTextField in reaction to other changes (eg isEnabled, active, not active etc) always calls updateColors() which in turn calls updateTextColor() which in setting the textColor value of the UITextField overrides any color attributes that have been set in the attributedText, making it basically unusable.
With this change, if attributedText is set to a non-nil value, any changes to textColor are ignored, and internally the attributed string will remain unchanged when updateTextColor() is called, except to set it to the error color in the case of an error.
Adds support for using setting the
attributedText
property of theUITextField
.Setting this value was always possible of course, but the logic of
SkyFloatingLabelTextField
in reaction to other changes (egisEnabled
, active, not active etc) always callsupdateColors()
which in turn callsupdateTextColor()
which in setting thetextColor
value of theUITextField
overrides any color attributes that have been set in theattributedText
, making it basically unusable.With this change, if
attributedText
is set to a non-nil value, any changes totextColor
are ignored, and internally the attributed string will remain unchanged whenupdateTextColor()
is called, except to set it to the error color in the case of an error.