Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

High CPU animating static value after updating progress #41

Open
rowan-OzRunways opened this issue Aug 24, 2020 · 0 comments
Open

High CPU animating static value after updating progress #41

rowan-OzRunways opened this issue Aug 24, 2020 · 0 comments

Comments

@rowan-OzRunways
Copy link

Updating progress updateProgress(1.0) calls animate() eventually leading to progressLayer.add(animation, forKey: AnimationKeys.progress)

This leads to high CPU use due system calling draw() repeatedly even after the animation has finished and the progress is set to the final value.

Setting animation.isRemovedOnCompletion = true fixes the issue at my end. Another work around is setting a completion handler and calling updateProgress(1.0, animated: false, ...) to kill the animation, which is not ideal.

I'm unaware of any broader issues setting isRemovedOnCompletion so leaving this as an issue rather than pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant