You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
I am developing a speedtest app and using the framework for showing countdown for a download period. By default it is planned to be animating 10 seconds like: self.uploadCircle.setProgress(value: 100, animationDuration: 10.0)
but sometimes download finishes earlier than 10 seconds. In those cases i want to stop the 10 second animation and immediately make it %100 percent. I tried several ways like:
func downloadTimerInvalidator () {
if let downReq = self.downloadRequest{
downReq.cancel()
}
DispatchQueue.main.async {
self.downloadCircle.setProgress(value: 100, animationDuration: 0.1)
}
}
but it didn't work. It is like ignoring this line and having the full 10 sec cycle. Any help is appreciated. Thanks.
The text was updated successfully, but these errors were encountered:
- Add a property for accessing the current value of the progress ring while animating, closes [issue #14](#14)
- Add fix for removing a currently running animation when calling `setProgress(:)` while ring is animating, closes [issue #19](#19)
- Fixed access levels for variables and functions, changed from `public` to `open` to allow subclassing.
- Updated `docs` by running Jazzy
Whenever calling setProgress(:) while ring is animating, the current animation will be canceled and a new one will be started this should fix your issue!
Also, you can call self.downloadCircle.setProgress(value: 100, animationDuration: 0.1) with an animation duration of 0, which will cause no animation to occur and will instantly be set to that value.
Thanks for posting your issue, if you have any more questions feel free to update or read the docs here
Hello Luis,
I am developing a speedtest app and using the framework for showing countdown for a download period. By default it is planned to be animating 10 seconds like:
self.uploadCircle.setProgress(value: 100, animationDuration: 10.0)
but sometimes download finishes earlier than 10 seconds. In those cases i want to stop the 10 second animation and immediately make it %100 percent. I tried several ways like:
but it didn't work. It is like ignoring this line and having the full 10 sec cycle. Any help is appreciated. Thanks.
The text was updated successfully, but these errors were encountered: