     }
     
     // MARK: Layout
-    
     private func updateProperties() {
         // using init() will raise CGPostError, lets prevent it
-        if bounds == CGRectZero { return }
+        if bounds == CGRect.zero { return }
         
         createLayersIfNeeded()
         if onOffLayer != nil {
             onOffLayer.lineWidth   = lineWidth
-            onOffLayer.strokeColor = strokeColor.CGColor
+            onOffLayer.strokeColor = strokeColor.cgColor
         }
         
         if ringLayer != nil {

    func applyAnimation(animation: CABasicAnimation) {
        let copy = animation.copy() as? CABasicAnimation ?? CABasicAnimation()
        if  copy.fromValue == nil,
            let presentationLayer = presentationLayer() {
            copy.fromValue = presentationLayer.valueForKeyPath(copy.keyPath ?? "")
        }
        addAnimation(copy, forKey: copy.keyPath)
        performWithoutAnimation {
            self.setValue(copy.toValue, forKeyPath:copy.keyPath ??  "")
        }
    }
    
    func performWithoutAnimation(closure: Void -> Void) {
        CATransaction.begin()
        CATransaction.setDisableActions(true)
        closure()

    }
    
    private func ringColorWithAlpha() -> CGColor {
        return strokeColor.withAlphaComponent(ringAlpha).cgColor
    }
    
    // MARK: Animations
