mapbox / mapbox/mapbox-maps-ios
Use CADisplayLink.targetTimestamp to drive animations
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
The new flyTo implementation uses `Date()` directly. Which is not the most sophisticated way of handling timing in animations. We should use [`CADisplayLink.targetTimestamp`](https://developer.apple.com/documentation/quartzcore/cadisplaylink/1648422-targettimestamp) instead.
Also applies to `GestureDecelerationCameraAnimator`. See https://github.com/mapbox/mapbox-maps-ios/pull/692#discussion_r712514230
Also applies to `InterpolatedLocationProducer`
_Originally posted by @julianrex in https://github.com/mapbox/mapbox-maps-ios/pull/282#discussion_r618626797_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the new flyTo implementation, GestureDecelerationCameraAnimator, and InterpolatedLocationProducer, then read the linked PR discussion for the timing context. Trace where each animation currently obtains time from Date(); done means all three use CADisplayLink.targetTimestamp consistently and their animation timing remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100