Skip to content
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

SwiftReorder blocks other UIGestureRecognizers in tableview cells #27

Open
axiom-media opened this issue Jun 7, 2018 · 3 comments
Open

Comments

@axiom-media
Copy link

I have a UITableView with custom cells. In each cell I have a thumbnail image and each thumbnail has a UIGestureRecognizer which responds to long presses and triggers a full screen overlay with a zoomed version of the thumbnail.

After implementing SwiftReorder, my cells are no longer responding to the long press on thumbnail images. Is there a way to have SwiftReorder ignore gestures if they happen on a thumbnail image and send those gestures to my pre-exiting UIGestureRecognizer instead?

@axiom-media
Copy link
Author

Update: I'm sure there is a better way to achieve this, but I was able to get the functionality back by ensuring the minimumPressDuration on my thumbnail image gesture recognizer was set to a lower value than the tableView.reorder.longPressDuration property for SwiftReorder.

@costachung
Copy link

costachung commented Jun 14, 2018

@axiom-media You can use the TableViewReorderDelegate.
Implement the canReorderRowAt delegate method, and others as necessary.
func tableView(_ tableView: UITableView, canReorderRowAt indexPath: IndexPath) -> Bool { //If it is a thumbnail cell, then return false }

@AndroidJohnDoe
Copy link

I am facing same problem, can you tell me how you resolved that issue. I am using grouped (like in Demo Example in this project) like UITableview and there are button in Cell, I am unable to perform button click. Can you tell how to achieve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants