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

Fixes setting initial progress of Lottie animation #245

Merged
merged 3 commits into from
Jun 7, 2017
Merged

Fixes setting initial progress of Lottie animation #245

merged 3 commits into from
Jun 7, 2017

Conversation

simonmitchell
Copy link
Contributor

@simonmitchell simonmitchell commented May 26, 2017

Only updates animation if the view has a window to avoid issues with setting
initial progress of the animation (This was noticeable particularly in React-Native
projects due to didMoveToSuperview calling setNeedsAnimationUpdate before the
view was in a window, and then the didMoveToWindow call being blocked)

This is related to:
#91

But fixes it more extensively to handle situations where your view is added to it's superview before it is in a window like when being used in react-native like here:
lottie-react-native/lottie-react-native#122

…setting

initial progress of the animation (This was noticeable particularly in React-Native
projects due to didMoveToSuperview calling setNeedsAnimationUpdate before the
view was in a window, and then the didMoveToWindow call being blocked
Copy link
Collaborator

@buba447 buba447 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks!

@buba447 buba447 merged commit 4c623a8 into airbnb:master Jun 7, 2017
NSGolova pushed a commit to clario-tech/lottie-ios that referenced this pull request Nov 19, 2020
Fixes setting initial progress of Lottie animation
calda pushed a commit that referenced this pull request Dec 1, 2022
Fixes setting initial progress of Lottie animation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants