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

Breaks with some button colors #102

Open
vkrovi opened this issue May 5, 2017 · 0 comments
Open

Breaks with some button colors #102

vkrovi opened this issue May 5, 2017 · 0 comments

Comments

@vkrovi
Copy link

vkrovi commented May 5, 2017

Using Swift 3.0 Xcode 8.3.2
Breaks in file UIColorEx.swift
I don't know why it works on some colors and not all, but I added the below code to get color components.

func getComponents()->[CGFloat]{
        var fRed : CGFloat = 0
        var fGreen : CGFloat = 0
        var fBlue : CGFloat = 0
        var fAlpha: CGFloat = 0
        if self.getRed(&fRed, green: &fGreen, blue: &fBlue, alpha: &fAlpha) {
            return [fRed,fGreen,fBlue,fAlpha]
        } else {
            return [0,0,0,0]
        }

    }
    var redC: CGFloat {
        get {
            
            let components = getComponents()
            return components[0]
        }
    }
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