yoavlt/LiquidFloatingActionButton

Breaks with some button colors

Opened this issue · 0 comments

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]
        }
    }