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

High CPU animating static value after updating progress #41

Description

@rowan-OzRunways

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions