         }
         
         self.addAnimation(copy, forKey: copy.keyPath)
+        CATransaction.begin()
+        CATransaction.setDisableActions(true)
         self.setValue(copy.toValue, forKeyPath:copy.keyPath)
+        CATransaction.commit()
     }
 }
 

            
            if self.checked {
                strokeStart.toValue = onStrokeStart
                strokeStart.duration = 0.5
                //strokeStart.timingFunction = CAMediaTimingFunction(controlPoints: ?, ?, ?, ?)
                
                strokeEnd.toValue = onStrokeEnd
                strokeEnd.duration = 0.6
                //strokeEnd.timingFunction = CAMediaTimingFunction(controlPoints: ?, ?, ?, ?)
            } else {
                strokeStart.toValue = offStrokeStart
                strokeStart.duration = 0.5
                //strokeStart.timingFunction = CAMediaTimingFunction(controlPoints: ?, ?, ?, ?)
                
                strokeEnd.toValue = offStrokeEnd
                strokeEnd.duration = 0.6
                //strokeEnd.timingFunction = CAMediaTimingFunction(controlPoints: ?, ?, ?, ?)
            }
            self.onOffLayer.applyAnimation(strokeStart)
            self.onOffLayer.applyAnimation(strokeEnd)

        
        onOffLayer.fillColor = nil
        onOffLayer.strokeColor = UIColor.whiteColor().CGColor
        onOffLayer.lineWidth = 6
        onOffLayer.miterLimit = 6
        onOffLayer.lineCap = kCALineCapRound
        onOffLayer.masksToBounds = true
        
        let strokingPath = CGPathCreateCopyByStrokingPath(onOffLayer.path, nil, 6, kCGLineCapRound, kCGLineJoinMiter, 6)
        
        onOffLayer.bounds = CGPathGetPathBoundingBox(strokingPath)
        onOffLayer.position = CGPoint(x: CGRectGetMidX(onOffLayer.bounds), y: CGRectGetMidY(onOffLayer.bounds))
