Comments (3)
Hey @aveace, thanks for your feedback! I'll look into it a.s.a.p. to see if I can reproduce it.
from transition.
I managed to reproduce the issue. The cause for the animation to get stuck is that after interaction (i.e. the flick), the animation layers are started or continued, depending on their animation range relative to the current fractionComplete (see animate(_:)
in the TransitionDriver
). There's one layer in particular for which it is essential that it continues: the progressLayerAnimator
is a non-visible layer with a full animation range, added by the TransitionDriver
to guarantee a layer that animates over the full length of the transition. This is the only animation layer (aside from the sharedElementAnimator
) of which the completion is monitored by the completionCoordinator
, an object that basically wraps a dispatch group, ensuring the overall transition completion is only called when everything is done.
Back to the animate(_:)
function: that progressLayerAnimator
will have a range that "contains" the current overall fractionComplete
, and will be active
because its fractionComplete
has been adjusted and it has been paused the moment the interaction began (two reasons why a UIViewPropertyAnimator
enters the active
state). Therefore the TransitionDriver
will call continueAnimation(...)
on it. For a reason I do not yet understand, this doesn't always actually continue the animation. It seems that only with vigorous flicks the animation gets stuck, but all velocity-related properties are valid values (the velocity used in the AnimationTimingParameters
, the fractionComplete
upon moving to the animation phase, the durationFactor
passed in continueAnimation(...)
). Explicitly calling startAnimation()
also doesn't make a difference.
Since the progressLayerAnimator
isn't continued (nor is any other animation layer except the sharedElementAnimator
), it never completes, and therefore the whole transition never completes.
I must say I'm unsure why this happens, and will continue to investigate in the moments I can spare time for it, which at the moment unfortunately isn't much. 🤞🏻
from transition.
Release 1.1.0 packs several fixes for issues #5 #6 #1 which cover this issue too.
from transition.
Related Issues (10)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transition.