Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable camera animators to run without storing a reference #646

Merged
merged 10 commits into from
Sep 9, 2021

Conversation

jmkiley
Copy link
Contributor

@jmkiley jmkiley commented Sep 2, 2021

PRs must be submitted under the terms of our Contributor License Agreement CLA.

Fixes: < Link to related issues that will be fixed by this pull request, if they exist >

Pull request checklist:

  • Briefly describe the changes in this PR.
  • Document any changes to public APIs.
  • Apply changelog label ('breaking change', 'bug 🪲', 'build', 'docs', 'feature 🍏', 'performance ⚡', 'testing 💯') or use the label 'skip changelog'
  • Add an entry inside this element for inclusion in the mapbox-maps-ios changelog: <changelog>Updated BasicCameraAnimator so that it keeps animators alive while the animator is active.</changelog>.

Summary of changes

This PR stores a reference to an animator within BasicCameraAnimator and sets it to self while the animator is active. If the animation is paused or stopped, that property is set to nil. It uses the approach from @macdrevx's ah/keep-alive branch.

This also updates the CameraAnimatorsExample so that the animators are no longer properties. I also tested out pausing and stopping the animators and different points.

User impact (optional)

@jmkiley jmkiley added the breaking change ⚠️ If your pull request introduces a breaking change and updates are required when version is published label Sep 2, 2021
@jmkiley jmkiley enabled auto-merge (squash) September 9, 2021 13:38
@jmkiley jmkiley merged commit 8264ce5 into main Sep 9, 2021
@jmkiley jmkiley deleted the jk/animators-stay-alive branch September 9, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ⚠️ If your pull request introduces a breaking change and updates are required when version is published
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants