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
Gestures conflict with an overlay's inner scroll view #75
Comments
Hi @pavelhiq! thanks for the detailed issue. Did you try to use the
Did you try to set |
Wow, thanks for a swift reply @gaetanzanella! Yes, I did try that
Im not sure if setting Although I should mention that with |
Could you describe the exact scenario? I am not sure to understand what you are looking for. A sample code or a video of the problem might help.
You can reset the drivingScrollView (
You said |
Your case looks interesting. I'm not surprised there might be a potential gesture conflict…
does not look like a great solution because someone might want another condition one day, right? We should find a customizable solution instead. |
Using the overlay with the
.expandableHeight
style, I came across a scenario where I would not want to use the overlay's inner scroll view as driving for the overlay. That is for two reasons:contentSize.height < bounds.height
), it seems to be not possible to drag the overlay because there is nothing to actually scroll in the driving scroll viewIf I skip setting the
drivingScrollView
(or implementing the appropriate delegate method) however, the overlay's own pan gesture gets ignored whenever the inner scroll view is enabled. As a result, it becomes not possible to e.g. collapse the expanded overlay.After exploring the code a bit and with some experiments, I found that the problem can be resolved by allowing the overlay's private pan gesture to be recognized simultaneously with the pan gesture of the inner scroll view on certain condition. In particular, by allowing recognition when the inner scroll view reaches the top of its content, like this:
@gaetanzanella do you think adding the above change makes sense? or does that break the library's intent somehow? 🤔 please let me know and I can make a PR out of it, or otherwise just fork 🙂
The text was updated successfully, but these errors were encountered: