         progressText.frame = CGRect(origin: CGPoint(x: 0, y: self.bounds.height / 2 - textSize.height / 2), size: CGSize(width: self.bounds.width, height: textSize.height))
     }
     
+    // MARK: - Selectors
+    func updateProgressText() {
+        let nowTime = NSDate.timeIntervalSinceReferenceDate()
+        let changeTime = nowTime - countingStartTime
+        
+        if changeTime > Double(duration) {
+            displayLink?.invalidate()
+            displayLink = nil
+        } else {
+            let changeValue = progress - countingStartValue
+            var t = changeTime / duration
+            
+            if t > 0.91 {
+                t = 1
+            }
+            
+            progressText.string = "\((Int)((countingStartValue + changeValue * (CGFloat)(cubicBezier.easing(t))) * 100))"
+        }
+    }
+    
     // MARK: - Private Methods
+    private func initPropertiesDefaultValue() {
+        progressBarColor = UIColor(red: 33/255.0, green: 150/255.0, blue: 243/255.0, alpha: 1)
+        progressRingColor = UIColor(red: 187/255.0, green: 222/255.0, blue: 251/255.0, alpha: 1)
+        fillColor = UIColor.clearColor()
+        textColor = UIColor(red: 47/255.0, green: 125/255.0, blue: 183/255.0, alpha: 1)
+        progress = 0
+    }
+    
     private func initUI() {
-        // Assign Default values manully
-        progressBar.strokeColor = progressBarColor.CGColor
-        progressRing.strokeColor = progressRingColor.CGColor
-        progressText.foregroundColor = textColor.CGColor
         progressBar.fillColor = UIColor.clearColor().CGColor
         progressRing.fillColor = UIColor.clearColor().CGColor
-        fillBackground.fillColor = fillColor.CGColor
-        progressBar.strokeEnd = progress
-        progressText.string = "\((Int)(progress * 100))"
+        
+        // Disable implict animation
+        progressText.actions = ["contents": NSNull()]
         
         progressText.contentsScale = UIScreen.mainScreen().scale
         progressText.alignmentMode = kCAAlignmentCenter

//

import UIKit

@IBDesignable class CircularProgress: UIView {
    @IBInspectable var progressBarColor: UIColor = UIColor(red: 33/255.0, green: 150/255.0, blue: 243/255.0, alpha: 1) {
        didSet {
            progressBar.strokeColor = progressBarColor.CGColor
        }
    }
    @IBInspectable var progressRingColor: UIColor = UIColor(red: 187/255.0, green: 222/255.0, blue: 251/255.0, alpha: 1) {
        didSet {
            progressRing.strokeColor = progressRingColor.CGColor
        }
    }
    @IBInspectable var fillColor: UIColor = UIColor.clearColor() {
        didSet {
            fillBackground.fillColor = fillColor.CGColor
        }
    }
    @IBInspectable var textColor: UIColor = UIColor(red: 47/255.0, green: 125/255.0, blue: 183/255.0, alpha: 1) {
        didSet {
            progressText.foregroundColor = textColor.CGColor
        }

            }
            
            progressBar.strokeEnd = currentProgress
            progress = currentProgress
            
            countingStartTime = NSDate.timeIntervalSinceReferenceDate()
            countingStartValue = oldValue
            
            if displayLink == nil {
                displayLink = CADisplayLink(target: self, selector: #selector(updateProgressText))
                displayLink?.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSDefaultRunLoopMode)
            }
        }
    }
    @IBInspectable var duration: Double = 0.25 {
        didSet {
//            progressBar.duration = duration
        }
    }
    
