Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributed text support #328

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mluisbrown
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant