         
         return shapeLayer
     }
-}
-
-public extension SpringIndicator.Refresher {
-    public func startRefreshing(sendActions: Bool = false) {
-        if sendActions {
-            sendActionsForControlEvents(.ValueChanged)
-        }
-        
-        indicator.layer.addAnimation(refreshAnimation(), forKey: ScaleAnimationKey)
-        indicator.startAnimation()
-    }
-    
-    public func endRefreshing() {
-        refreshing = false
-        
-        if let scrollView = superview as? UIScrollView {
-            var insetTop: CGFloat = 0
-            
-            if scrollView.superview?.superview == nil {
-                insetTop = refreshingInsetTop - initialInsetTop
-            } else {
-                insetTop = refreshingInsetTop
-            }
-            
-            if scrollView.contentInset.top > insetTop {
-                scrollView.contentInset.top = insetTop
-            }
-        }
-        
-        indicator.stopAnimation(true)
-    }
-}
-
-private extension SpringIndicator.Refresher {
-    private func addObserver(scrollView: UIScrollView) {
-        if targetView == nil {
-            scrollView.addObserver(self, forKeyPath: ObserverOffsetKeyPath, options: .New, context: &RefresherContext)
-            targetView = scrollView
-        }
-    }
-    
-    private func refreshStart(scrollView: UIScrollView) {
-        let insetTop = refreshingInsetTop
-        
-        refreshing = false
-        scrollView.contentInset.top = insetTop
-        refreshing = true
-        
-        sendActionsForControlEvents(.ValueChanged)
-        indicator.layer.addAnimation(refreshAnimation(), forKey: ScaleAnimationKey)
-        indicator.startAnimation(expand: true)
-        
-        scrollView.contentOffset.y -= scrollView.contentInset.top - initialInsetTop
-        frame.origin.y = initialInsetTop + scrollView.contentOffset.y - bounds.height
-    }
-    
-    private func refreshAnimation() -> CAPropertyAnimation {
-        let anim = CABasicAnimation(keyPath: "transform.scale")
-        anim.duration = 0.1
-        anim.repeatCount = 1
-        anim.autoreverses = true
-        anim.fromValue = 1
-        anim.toValue = 1.3
-        anim.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
-        
-        return anim
+    
+    private func nextStrokeLayer(count: Double) -> CAShapeLayer {
+        let shapeLayer = rotateLayer()
+        shapeLayer.path = nextRotatePath(count).CGPath
+        
+        return shapeLayer
     }
 }
 

    
    private func strokeValue(value: CGFloat) {
        if pathLayer == nil {
            let shapeLayer = rotateLayer(0)
            indicatorView.layer.addSublayer(shapeLayer)
            
            pathLayer = shapeLayer
        }
        
        let anim = stroke(fromValue: 0, toValue: value)
        pathLayer?.addAnimation(anim, forKey: Me.ExpandAnimationKey)
    }
    
    private func stroke(#fromValue: CGFloat, toValue: CGFloat) -> CAPropertyAnimation? {
        let anim = CAKeyframeAnimation(keyPath: "strokeEnd")
        anim.duration = 0
        anim.repeatCount = HUGE
        anim.keyTimes = [0, 0]
        anim.values = [fromValue, toValue]
        anim.fillMode = kCAFillModeBackwards
        return anim
    }
}

        var arc = UIBezierPath(arcCenter: center, radius: radius,  startAngle: start, endAngle: end, clockwise: true)
        arc.lineWidth = 0
        
        return arc
    }
    
    private func rotateLayer() -> CAShapeLayer {
        let shapeLayer = CAShapeLayer()
        shapeLayer.strokeColor = lineColor.CGColor
        shapeLayer.fillColor = nil
        shapeLayer.lineWidth = lineWidth
