             animation.toValue = 0
             animation.completionBlock = {(anim, finished) in
                 if finished {
-                    self.setNeedsDisplay()
-                    self.stopAnimation()
                     self.resetProgress()
+                    self.destroyDisplayLink()
                     self.image = self.newImageView.image
                 }
             }

    
    private func setUpdateProgress(progress: NSProgress) {
        stopAnimation()
        initDisplayLinkAndShowImageMask()
        status = .InProgress
        smoothToAngle(CGFloat(progress.fractionCompleted))
    }

    private func stopAnimation() {
        circleAngle.pop_removeAnimationForKey("angle")
        displayLink?.invalidate()
        displayLink = nil
    }
    private func initDisplayLinkAndShowImageMask() {
        displayLink = CADisplayLink(target: self, selector: #selector(CircleProgressImageView.displayLinkAction(_:)))
        displayLink?.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSDefaultRunLoopMode)
        if status == .Normal {
            circleRadiusMargin.value = 5
            fadeinImageMaskView()
        }
    }
    private func smoothToAngle(angle: CGFloat) {
        let angleProperty = POPAnimatableProperty.propertyWithName("angle") { (property) in

    var value: CGFloat = 0.0
}
class ProgressRadiusMargin: NSObject {
    var value: CGFloat = 5.0
}

@IBDesignable
