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

getLabelFont() not working as intended #54

Open
klaas opened this issue Jun 27, 2018 · 0 comments
Open

getLabelFont() not working as intended #54

klaas opened this issue Jun 27, 2018 · 0 comments

Comments

@klaas
Copy link

klaas commented Jun 27, 2018

The lazy initialization of the font is dependent on touchUpFlag and thus it's either .thin or .regular but not changing as it is intended.

    fileprivate func getLabelFont() -> UIFont {
        if labelFont != nil {
            return labelFont!
        }
        
        let width = bounds.width
        let height = bounds.height
        let radius = min(width, height) / 2
        return UIFont.systemFont(ofSize: radius * fontSizeRatio,
                                 weight: touchUpFlag ? UIFont.Weight.thin : UIFont.Weight.regular)
    }
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