         newImageView.layer.mask = shapeMaskLayer
     }
     
+    override var contentMode: UIViewContentMode {
+        didSet {
+            self.newImageView.contentMode = contentMode
+            self.setNeedsDisplay()
+        }
+    }
+    
     // MARK : - Public
     func progressFailed() {
         progress.completedUnitCount = 0
         self.setUpdateProgress(progress)
     }
     func resetProgress() {
+        circleAngle.pop_removeAnimationForKey("angle")
+        circleRadiusMargin.pop_removeAnimationForKey("radiusMargin")
+        
         progress.completedUnitCount = 0
         status = .Normal
         circleAngle.value = 0.0
+        circleRadiusMargin.value = 5.0
         imageMaskView.alpha = 0.0
+        destroyDisplayLink()
         self.setNeedsDisplay()
     }
 

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

@IBDesignable

    
    private func setUpdateProgress(progress: NSProgress) {
        stopAnimation()
        if displayLink == nil {
            initDisplayLink()
        }
        if status == .Normal {
            fadeinImageMaskView()
        }
        status = .InProgress
        smoothToAngle(CGFloat(progress.fractionCompleted))
    }

    private func stopAnimation() {
        circleAngle.pop_removeAnimationForKey("angle")
    }
    private func destroyDisplayLink() {
        displayLink?.invalidate()
        displayLink = nil
        self.setNeedsDisplay()
    }
    private func initDisplayLink() {
        displayLink = CADisplayLink(target: self, selector: #selector(CircleProgressImageView.displayLinkAction(_:)))
        displayLink?.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSDefaultRunLoopMode)
    }
    private func smoothToAngle(angle: CGFloat) {
        let angleProperty = POPAnimatableProperty.propertyWithName("angle") { (property) in
