             animation!.duration = 0.5;
             
         }
+        self.backgroundLayer.lineWidth = width
         self.progressLayer.lineWidth = width
         self.lineWidth = width
         if animation != nil {

        progressLayer.lineWidth = lineWidth
        self.layer.addSublayer(progressLayer)
        
    }
    
    
    override public func layoutSubviews() {
        super.layoutSubviews()
        progressLayer.frame = CGRectInset(self.bounds, 0, 0)
        updatePath()
    }
    

@IBDesignable public class CBProgressView : UIControl {
    
    private let progressLayer: CAShapeLayer = CAShapeLayer()
    private let backgroundLayer: CAShapeLayer = CAShapeLayer()
    
    @IBInspectable public var lineWidth: CGFloat = 2 {
        didSet { progressLayer.lineWidth = lineWidth }
