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

Update Error Label Font #340

Open
anish190 opened this issue May 9, 2022 · 0 comments
Open

Update Error Label Font #340

anish190 opened this issue May 9, 2022 · 0 comments

Comments

@anish190
Copy link

anish190 commented May 9, 2022

I am trying to set the font for error label, but it is always taking the title font. SkyFloatingLabelTextField creates error label with titleFont. Setting textfield.errorLabel.font = UIFont.systemFont(ofSize: 12.0) is not working. It updates only when i update titleFont but I want to have different font size for title and error label.

// SkyFloatingLabelTextField.swift

fileprivate func createErrorLabel() {
        let errorLabel = UILabel()
        errorLabel.autoresizingMask = [.flexibleWidth, .flexibleHeight]
        errorLabel.font = titleFont
        errorLabel.alpha = 0.0
        errorLabel.textColor = errorColor
        addSubview(errorLabel)
        self.errorLabel = errorLabel
}

Xcode Version: 13.3.1
SkyFloatingLabelTextField Version: 4.0

@anish190 anish190 changed the title Change Error Label Font Update Error Label Font May 9, 2022
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

No branches or pull requests

1 participant