     override func drawRect(rect: CGRect) {
         drawBackCircle()
         drawProgressCircle()
-        animate()
+        progress = 0.8
     }
     
     override func layoutSubviews() {

@IBDesignable class ProgressCircleView: UIView {

    @IBInspectable var progressCircleColor: UIColor = UIColor.clearColor()
    @IBInspectable var backCircleColor: UIColor = UIColor.blackColor()
    @IBInspectable var layerOpacity: Float = 0.1
    @IBInspectable var borderWidth: CGFloat = 40.0
    
    var currentProgress: CGFloat = 0.0
    var progress: CGFloat = 0.0
    
    private let progressCircleLayer: CAShapeLayer = CAShapeLayer()
    private let backCircleLayer: CAShapeLayer = CAShapeLayer()
    private var circleCenter: CGPoint = CGPointZero
    private var radius: CGFloat {
        return CGFloat((self.frame.size.width - borderWidth/2.0)/2.0)
    }
    
    override func awakeFromNib() {

        let endAngle = CGFloat(M_PI + M_PI_2)
        let path = UIBezierPath(
            arcCenter: circleCenter,
            radius: progressCircleRadius,
            startAngle: startAngle,
            endAngle: endAngle,
            clockwise: true)
        progressCircleLayer.path = path.CGPath
        progressCircleLayer.lineWidth = progressBorderWidth
        progressCircleLayer.lineCap = kCALineCapRound
        progressCircleLayer.strokeColor = progressCircleColor.CGColor
        progressCircleLayer.fillColor = nil
        progressCircleLayer.strokeStart = 0.0
        progressCircleLayer.strokeEnd = progress
        self.layer.addSublayer(progressCircleLayer)
    }
    
    func animateProgress(from from: CGFloat, to: CGFloat) {
        CATransaction.begin()
        let animation = CABasicAnimation(keyPath: "strokeEnd")
        animation.fromValue = from
        animation.toValue = to
        animation.duration = NSTimeInterval(progress * 1.5)
        animation.delegate = self
        animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
        self.progressCircleLayer.strokeEnd = progress
        self.progressCircleLayer.addAnimation(animation, forKey: "progress")
        CATransaction.commit()
    }
}
