             return
         }
         animating = false
-        hidden = true
+        isHidden = true
         removeAnimation()
     }
-
+    
 }

        let anim = animation()
        anim.timeOffset = stopTime - startTime
        
        layer.addAnimation(anim, forKey: rotationAnimationKey)
        
        startTime = layer.convertTime(CACurrentMediaTime(), fromLayer: nil)
    }
    
    private func removeAnimation() {
        layer.removeAnimationForKey(rotationAnimationKey)
        
        stopTime = layer.convertTime(CACurrentMediaTime(), fromLayer: nil)
    }
    
    func restartAnimationIfNeeded() {
        let anim = layer.animationForKey(rotationAnimationKey)
        
        if animating && anim == nil {
            removeAnimation()

    }
    
    private func setupBezierPaths() {
        let center = CGPoint(x: bounds.size.width * 0.5, y: bounds.size.height * 0.5)
        let radius = bounds.size.width * 0.5 - thickness
        let ringPath = UIBezierPath(arcCenter: center, radius: radius, startAngle: CGFloat(0), endAngle: CGFloat(M_PI * 2), clockwise: true)
        let quarterRingPath = UIBezierPath(arcCenter: center, radius: radius, startAngle: CGFloat(-M_PI_4), endAngle: CGFloat(M_PI_2 - M_PI_4), clockwise: true)
        
        outerCircle.path = ringPath.cgPath
        innerCircle.path = quarterRingPath.cgPath
    }
    
    // MARK: - Public
