-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
LottieAnimationView remove animation, but LottieAnimationLayer.rootAnimationLayer not remove #2207
Comments
From reading the code, calling Was there a bug or regression introduced by the architecture changes that added |
I see, in Lottie 4.2.0 the implementation of if let oldAnimation = animationLayer {
oldAnimation.removeFromSuperlayer()
animationLayer = nil
} but the current implementation of if let oldAnimation = animationLayer {
oldAnimation.removeFromSuperlayer()
} so we are no longer setting @eromanc made this change as a part of #2073. @eromanc -- was this intentional? Is this necessary for a specific reason? I can't think of any reason why adding back the |
let view = LottieAnimationView()
view.animation = someAnim
view.animation = nil
view.imageProvider = aNewProvider Setting the new |
@calda perhaps because would this work instead?
|
Yeah, I think adding |
I just tested that on Origami and nothing seems to break, so I think that change would be good on my end. |
Which Version of Lottie are you using?
Lottie 4.3.3
Expected Behavior
remove animation
https://github.com/airbnb/lottie-ios/blob/45517c3cfec9469bbdd4f86e32393c28ae9df0bc/Sources/Public/Animation/LottieAnimationLayer.swift#L1149C3-L1149C3
Why not set the
LottieAnimationLayer.rootAnimationLayer
tonil
? TherootAnimationLayer
will continuereloadImages
The text was updated successfully, but these errors were encountered: