Open Adamf155 opened 4 years ago
Hi @Adamf155, thanks for reporting this issue. I am aware of this and it is something I have tried to address in the past.
To debug this, I would start by "building up" your cards again: do you see the issue with a blank card? A card with just your content and no overlays? Just overlays? This would help pin down what part of the card might be causing this issue during the animation. My current theory is that this happens when there is simply too much content to animate on the card.
I have a couple of additional suggestions that may help:
card.layer.shouldRasterize = true
card.layer.rasterizationScale = UIScreen.main.scale
This will render all layers of your card as a bitmap image and will improve performance. Some goods resources on this technique here and here.
By the way, are you seeing this issue only on the simulator? I have seen this issue on a device as well, but the simulator is an unreliable place to test GPU-intensive processes.
Let me know if any of the above works for you! If not, I will prioritize this issue and we can try to come up with a solution.
Mac
Hi @mac-gallagher, I have this issue too; I don't know if it helps, but I have this issue only when swiping the card on the screen with fingers, with the simulator or a real device. If I swipe the card programmatically by calling .swipe(:animated), the animation is perfectly smooth. Thanks for your help!
Is your feature request related to a problem? Please describe.
Yes, currently when you swipe the card (left or right), a slight pause occurs after releasing the drag gesture. After releasing the drag gesture, the card stops abruptly then continues going in the direction the user swiped. This leads to a poorer user experience because it disobeys physics and the expected card movement the user is predicting.
Describe the solution you'd like
Make it so by default, after the user has crossed a certain location on the X axis (Positive and Negative) the card will automatically continue moving with its current speed/momentum even when the user releases the Drag Gesture.