 
 struct OnOff {
     static var innerPath: CGPath {
-        let path = CGPathCreateMutable()
-        CGPathMoveToPoint(path, nil, 60.48, 17.5)
-        CGPathAddLineToPoint(path, nil, 31.63, 46.34)
-        CGPathAddLineToPoint(path, nil, 5.05, 19.76)
-        CGPathAddCurveToPoint(path, nil, 13.84, 2.51, 34.92, -4.33, 52.15, 4.44)
-        CGPathAddCurveToPoint(path, nil, 69.37, 13.22, 76.22, 34.3, 67.44, 51.53)
-        CGPathAddCurveToPoint(path, nil, 58.67, 68.75, 37.59, 75.6, 20.36, 66.82)
-        CGPathAddCurveToPoint(path, nil, 3.14, 58.05, -3.71, 36.97, 5.07, 19.74)
+        let path = CGMutablePath()
+        path.move(to: CGPoint(x:60.48,y:17.5))
+        path.addLine(to: CGPoint(x:31.63,y:46.34))
+        path.addLine(to: CGPoint(x:5.05,y:19.76))
+        path.addCurve(to: CGPoint(x:52.15,y:4.44), control1: CGPoint(x:13.84,y:2.51), control2: CGPoint(x:34.92,y:-4.33))
+        path.addCurve(to: CGPoint(x:67.44,y:51.53), control1: CGPoint(x:69.37,y:13.22), control2: CGPoint(x:76.22,y:34.3))
+        path.addCurve(to: CGPoint(x:20.36,y:66.82), control1: CGPoint(x:58.67,y:68.75), control2: CGPoint(x:37.59,y:75.6))
+        path.addCurve(to: CGPoint(x:5.07,y:19.74), control1: CGPoint(x:3.14,y:58.05), control2: CGPoint(x:-3.71,y:36.97))
+ 
         return path
     }
     
     static func ringPathForFrame(frame: CGRect) -> CGPath {
-        let outerPath = UIBezierPath(ovalInRect: frame)
-        return outerPath.CGPath
+        let outerPath = UIBezierPath(ovalIn: frame)
+        return outerPath.cgPath
     }
 }
 

                strokeStart    = animations.strokeStart
                strokeEnd      = animations.strokeEnd
            }
            onOffLayer.applyAnimation(strokeStart)
            onOffLayer.applyAnimation(strokeEnd)
        }
    }
    

        }
    }
    
    @IBInspectable public var strokeColor: UIColor = UIColor.white {
        didSet {
            updateProperties()
        }
