     }
 
     private func updateProgress() {
+        let ctx = UIGraphicsGetCurrentContext()
+        CGContextSaveGState(ctx)
+        if(borderLayer == nil) {
+            borderLayer = CAShapeLayer()
+            //backgroundColor = UIColor.clearColor()
+            let circle = UIBezierPath(ovalInRect: self.bounds)
+            circle.stroke()
+            borderLayer?.fillColor = UIColor.clearColor().CGColor
+            borderLayer?.strokeColor = tintColor.CGColor
+            borderLayer?.lineWidth = 2.0
+            borderLayer?.path = circle.CGPath
+            self.layer.addSublayer(borderLayer!)
+        }
+
+        
         let center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds))
         var radius = self.bounds.size.width
         if(self.bounds.size.height < radius) {

    private var progressLayer : CAShapeLayer?
    private var borderLayer : CAShapeLayer?
    
    public var progress : CGFloat = 0 {
        willSet(v) {
            if v > 1.0 || v < 0.0 {

        arc.fill()
        progressLayer?.path = arc.CGPath
        progressLayer?.fillColor = self.tintColor.CGColor
        CGContextRestoreGState(ctx)
    }
    /*
    override public func layoutSubviews() {
        super.layoutSubviews()
    }
    */

}
