-
Notifications
You must be signed in to change notification settings - Fork 95
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
Gesture recognizer conflicts with UITableViewCell gesture recognizers for cell actions #71
Comments
I had exactly the same issue as yours: it was not possible to open the the Swipe Actions of a tableview embedded in an It seems that, as you mention, there is a conflict between the tableview gesture recognizers and the
So, I came up with the following workaround, consisting in implementing
then:
(where
Clearly this is pretty hacky, but it did the job. @gaetanzanella : if you confirm that the |
@hberenger So this allowed you to use the tableview actions? @gaetanzanella I'm always afraid of claiming delegate ownership to gestures as that can cause problems if it relies on it somehow. Do you have any recommendations? |
@bryan1anderson : yes, I confirm this workaround repaired the tableview swipe actions |
Hi @bryan1anderson @hberenger, thanks for raising the issue. A fix is available. I will release it soon. If you return func overlayContainerViewController(_ containerViewController: OverlayContainerViewController,
shouldStartDraggingOverlay overlayViewController: UIViewController,
at point: CGPoint,
in coordinateSpace: UICoordinateSpace) -> Bool {
let position = overlayViewController.view.convert(point, from: coordinateSpace)
return overlayViewController.view.bounds.contains(position)
} |
But I don't want it to be disabled. There is effectually a point on every single point on the view because its just a tableview. I need them to behave together. I don't care about horizontal pans on the container view, and I don't care about vertical pans on the tableview. It seems what you're saying the fix does is just not allow panning if the touch is on a certain point. All my points need to be able to handle both of these @gaetanzanella |
I'm not sure I understand. Could you provide a sample code? |
@gaetanzanella Sorry to be unclear. Your solution doesn't support recognizing multiple gesture recognizers. Your solution seems to support only supporting For example: |
Describe the bug
Gesture recognizer conflicts with UITableViewCell gesture recognizers for cell actions
Expected behavior
I should reliably be able to swipe on a cell when it is placed in the overlaycontainer.
I pan gesture property is private so I don't have access to require it to fail to the cell swipe gestures.
How do I get swipeable tableviewcells to work using OverlayContainer?
The text was updated successfully, but these errors were encountered: