如何从后台刷新圆形动画? Swift

How do I refresh a circular animation from the background? Swift

我的应用有圆形动画from the framework connected to the timer. When the timer is running, the animation starts. If the app goes into the background, the animation stops. When we return to the app, the animation continues from the same place, when did stopped. How do I get the animation to recalculate and start from where the timer is now? I attached screenshot. All animation methods are concentrated in one file

我在框架中创建了一个新方法,我将剩余的时间传递给它。该方法更改计时器中的值。谢谢大家

    public func updateTime(time: Int) {
    elapsedTime = TimeInterval(time)
    delegate?.timerDidResume?(sender: self)
}