Closed karthuszY closed 1 year ago
FloatingPanelController doesn't track a scroll view in the content automatically. Please call this method to recognize a scroll view to it.
let fpc = FloatingPanelController()
...
fpc.track(scrollView: contentVC.scrollView)
FloatingPanelController doesn't track a scroll view in the content automatically. Please call this method to recognize a scroll view to it.
let fpc = FloatingPanelController() ... fpc.track(scrollView: contentVC.scrollView)
I have tried it. But it still does not work? Should I config anything more?
This doesn't work for me, at least only partially.
What does work is to quickly flick and let go. Then the scrollView bounce is connected with a bounce of the panel. However, when starting the scroll from an offset below the top and dragging towards the bottom, the scrollView simply stops scrolling and the panel doesn't move.
I've added this to the extension MainViewController: UITableViewDelegate
in SearchViewController.swift
:
func scrollViewDidScroll(_ scrollView: UIScrollView) {
fpc.followScrollViewBouncing()
}
I analyzed the problem and found that due to calling lockScrollView(strict: true)
the scrollView no longer sends didScroll events. The gesture handling code is quite complex, so I'm unaware how to fix this. @scenee, can you take a look?
https://github.com/scenee/FloatingPanel/assets/110374/3c14fd32-f65e-4fb8-ac3b-c4fd9f75c7fe
@futuretap Thank you for providing your feedback. I greatly appreciate it. Your screen recording has helped me understand the steps to reproduce this issue. After debugging the code, I found the root cause is that the prioritization of panel and scroll gestures. I will continue to investigate and resolve this issue.
thanks, looks good!
Btw, Apple's Maps app suffers from the exact same problem. They should use your implementation 😉
It's the power of community! Thanks for your help 😄
Description
When the fpc contentViewController has scrollView, i can't dismiss it by drag the content. It's now only can drag the grabberHandle area to dismiss.
Expected behavior
When scroll view is at top, drag it to dismiss fpc.