-
Notifications
You must be signed in to change notification settings - Fork 47
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
Disable bounce effect in interactive transitions #27
Comments
The underlying problem with this is that this bounce comes from UIKit. What I mean is, when you finish or cancel the transition, UIKit drives the progress to completion and bounces the value beyond [0, 1] as it sees fit (as far as I can tell from experimentation). To eliminate the bounce cleanly, we would need to know the bounce formula in order to counteract it. So I don't have a better idea than what you're already doing. You might be interested in looking at #25, which talks about discrete jumps at the end of the transition. The underlying cause is that TLLayoutTransitioning truncates progress between [0, 1] like you've done above in some calculations but not others. I'm in the process of removing all of this truncation to resolve #25, but I don't think this will affect your workaround. |
I see. I spent some hours looking for a workaround without success. It's a minor issue in our app so we're just going to focus on other stuff for now. Will update if I get to work on this again. Thanks ! |
@wtmoose Have you found a solution? |
@AEugene no, I have not. |
Hi!
There seems to be a bounce effect when you complete an interactive transition, I'd like to replace that by just decelerating to final position without bouncing.
You can check this effect in the Example project, if you pinch and release it'll complete the interactive transition with a bounce effect going a bit further than final progress in some cases.
The workaround I found is to subclass TLTransitionLayout and override the
setProgress:time:
method limiting values to 0..1This does get rid for the bounce effect (it's no longer visible to the user) but the transition still takes some time to complete because it thinks it's bouncing.
Any idea how can I solve this issue?
Thanks in advance,
Nicolás.
The text was updated successfully, but these errors were encountered: