         ringLayer.gradientColorLocations = gradientColorLocations
         ringLayer.gradientStartPosition = gradientStartPosition
         ringLayer.gradientEndPosition = gradientEndPosition
-
+        
         ringLayer.startAngle = startAngle
         ringLayer.endAngle = endAngle
-
+        
         ringLayer.outerRingWidth = outerRingWidth
         ringLayer.outerRingColor = outerRingColor
         ringLayer.outerBorderWidth = outerBorderWidth
         ringLayer.outerBorderColor = outerBorderColor
         ringLayer.outerCapStyle = outerCapStyle
-
+        
         ringLayer.innerRingWidth = innerRingWidth
         ringLayer.innerRingColor = innerRingColor
         ringLayer.innerCapStyle = innerCapStyle
         ringLayer.innerRingSpacing = innerRingSpacing
-
+        
         ringLayer.shouldShowValueText = shouldShowValueText
         ringLayer.valueIndicator = valueIndicator
         ringLayer.fontColor = fontColor
         ringLayer.font = font
         ringLayer.showFloatingPoint = showFloatingPoint
         ringLayer.decimalPlaces = decimalPlaces
-
+        
         backgroundColor = UIColor.clear
         ringLayer.backgroundColor = UIColor.clear.cgColor
-    }
-
+        
+        
+        NotificationCenter.default.addObserver(self, selector:#selector(restoreProgress), name: Notification.Name.UIApplicationWillEnterForeground, object: nil)
+        
+        NotificationCenter.default.addObserver(self, selector:#selector(snapshotProgress), name: Notification.Name.UIApplicationWillResignActive, object: nil)
+    }
+    
     /**
      Overriden because of custom layer drawing in UICircularProgressRingLayer
      */
     open override func draw(_ rect: CGRect) {
         super.draw(rect)
     }
-
+    
     /**
      Called whenever the layer updates its `value` keypath, this method will then simply call its delegate with
      the `newValue` so that it notifies any delegates who may need to know about value updates in real time

    @objc open var isAnimating: Bool {
        return completionTimer?.isValid ?? false
    }

    /**
     The direction the circle is drawn in
     Example: true -> clockwise

            ringLayer.innerRingSpacing = innerRingSpacing
        }
    }
    
    /**
     The style for the inner ring end cap (how it is drawn on screen)
     
