 
 class ENMCircle: UIView {
     
-    init(size: CGSize, redValue: Double = 1.0, greenValue: Double = 0.0, blueValue: Double = 0.0) {
+    init(size: CGSize, redValue: CGFloat = 1.0, greenValue: CGFloat = 0.0, blueValue: CGFloat = 0.0) {
         super.init(frame: CGRectMake(0.0, 0.0, size.width, size.height))
         layer.contents = generateRadialWithRed(redValue, green: greenValue, blue: blueValue).CGImage
     }

// MARK: - Gradients
extension ENMCircle {
    
    func generateRadialWithRed(red: Double, green: Double, blue: Double) -> UIImage {
        var gradient: CGGradientRef?
        var colorSpace: CGColorSpaceRef?
        var numberOfLocation: size_t = 6
        let locations: Double[] = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0]
        let components: Double[] = [0.0,   0.0,    0.0,    1.0,
            red,   green,  blue,   1.0,
            red,   green,  blue,   0.8,
            red,   green,  blue,   0.6,
            red,   green,  blue,   0.2,
            red,   green,  blue,   0.0]
        
        colorSpace = CGColorSpaceCreateDeviceRGB()
        gradient = CGGradientCreateWithColorComponents(colorSpace,
            components,
            locations,
            numberOfLocation)
        
        var startPoint: CGPoint = CGPointMake(frame.size.width/2, frame.size.height/2)
        var endPoint: CGPoint = CGPointMake(frame.size.width/2, frame.size.height/2)

        
        layer.addAnimation(fadeOut, forKey: "fade")
    }
}
