Closed tarrouye closed 1 year ago
I believe this issue doesn't happen on the Samples app. So it should depend on your application. I guess there are 2 possible causes.
floatingPanelDidMove
delegate is blocking the animation: v2 calls the delegate while a user drags the surface or the surface animates to a state anchor. On the other hand, v1 called only when a user drags. Therefore the delegate method can block the panel animation if its implementation is heavy.@scenee Thank you so much for the insight, that's very helpful. Both of those sound like changes that could have caused a performance hit for us. Appreciate the response, and will take a look on our end.
Description
We recently updated this library from version
1.7.6
to2.5.5
in our project, and after updating all of our layouts etc to meet the new APIs, I've noticed that the animations and movement when dragging or programmatically moving the panels feels super laggy and uncomfortable on the newer version.Expected behavior
The panel movement should be smooth.
Actual behavior
The panel movement feels slow, stuttery, and makes the app feel laggy.
It's a bit hard to see in video, but here is one anyways comparing an empty panel from this library to the one from Apple Maps. On device, moving it yourself, it's very apparent.
https://user-images.githubusercontent.com/5017270/211762411-5a9134d7-8975-4df4-968b-794355bcdc4e.mov
Steps to reproduce
I see this on every panel in our application after updating, simply by dragging them around or by triggering actions that call the
move(to: ..)
function. It feels especially apparent when triggering a move from.full
to.tip
, where it seems to get especially funky around the.half
position on the way down.Code example that reproduces the issue
the layout:
simply applied to a floating panel as done in the docs
How do you display panel(s)?
How many panels do you displays?
Environment
Library version
2.5.5
Installation method
iOS version(s)
16.2
Xcode version
14.2