-
Notifications
You must be signed in to change notification settings - Fork 149
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
[Camera Animations] Introduce short-lived camera view #282
Conversation
My mistake 😬 |
78284b1
to
7f90949
Compare
6bb9c4d
to
9be58e0
Compare
*/ | ||
func schedulePendingCompletion(forAnimator animator: CameraAnimator, | ||
/// Ask the map to set camera to new camera | ||
func jumpTo(camera: CameraOptions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should consider splitting up the responsibilities of this protocol. Some of them could be fulfilled by injecting each animator with the MapboxMap. The rest (the ones that are UIView-related could be contained in a more focused protocol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this. Could we perhaps do it as part of subsequent PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c434462
to
c7959d1
Compare
17c3f85
to
370ece1
Compare
370ece1
to
62183b9
Compare
13e79cb
to
be3f0a0
Compare
be3f0a0
to
ef5a8ef
Compare
6fd2914
to
73aaef2
Compare
PRs must be submitted under the terms of our Contributor License Agreement CLA.
Pull request checklist:
mapbox-maps-ios
changelog:<changelog></changelog>
.Summary of changes
CameraView
CameraView
has been significantly curtailed with this PR.CameraView
will only exist (i.e. be part of the view hierarchy) for the duration of an animated transition.cameraView
.CameraManager
makeCameraAnimator*
methods have been updated to acceptCameraAnimations
as required arguments.makeCameraAnimator*
methods have been renamed tomakeAnimator*
methodsCameraTransition (new)
CameraTransition
is a new construct that allows better control on the "from" and "to" values of a camera animationFlyToCameraAnimator (new)
flyTo
has been re-implemented to rely solely on theFlyToInterpolator
. There is no interaction with keyframe animations any more.BasicCameraAnimator (renamed from
CameraAnimator
)CameraAnimator (new)
FlyToCameraAnimator
andBasicCameraAnimator
conform toCameraAnimator
CameraAnimatorInterface(new)
FlyToCameraAnimator
andBasicCameraAnimator
conform toGestures
__map.setCamera()
instead of going via CoreAnimationUser Impact
The call site for camera animators now looks like:
Animations can only be added to an animator at init-time. They must be passed into one of the
makeAnimator*
functions.The
addAnimation(_ animations: () -> Void, delayFactor: CGFloat)
method has been removed in favor of constructor injecting animations.Videos:
FlyTo
RPReplay_Final1618957459.MP4
Animations
RPReplay_Final1618957647.MP4
Animated Padding
padding.mov