             colorAnimation.fillMode = kCAFillModeForwards
             colorAnimation.removedOnCompletion = false
             colorAnimation.delegate = self
-            colorAnimation.setValue(adjustedColors, forKey: "setupFade")
             gradientMask.addAnimation(colorAnimation, forKey: "setupFade")
         } else {
             gradientMask.colors = adjustedColors

    
    override public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
        if anim is GradientAnimation {
            if let finalColors = anim.valueForKey("setupFade") as? [CGColorRef] {
                maskLayer?.colors = finalColors
            }
            // Remove regardless, since we set removeOnCompletion = false

        var gradientAnimation: CAKeyframeAnimation? = nil
        if fadeLength > 0.0 {
            // Remove any setup animation, but apply final values
            if let setupAnim = maskLayer?.animationForKey("setupFade") as? CABasicAnimation, finalColors = setupAnim.toValue as? [CGColorRef] {
                maskLayer?.colors = finalColors
            }
            maskLayer?.removeAnimationForKey("setupFade")
