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

Trying to move a table item down makes the modal dismiss #82

Closed
4 of 9 tasks
Jsayer7 opened this issue Feb 14, 2020 · 2 comments
Closed
4 of 9 tasks

Trying to move a table item down makes the modal dismiss #82

Jsayer7 opened this issue Feb 14, 2020 · 2 comments

Comments

@Jsayer7
Copy link

Jsayer7 commented Feb 14, 2020

Description

Describe your issue here.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

The tableview that I'm displaying in the PanModal has editing capabilities. If I try to move an item from the top of the list downwards, the modal thinks I'm swiping downwards, dismissing the modal

Reproducible in:

Xcode 11.3.1

PanModal version:
1.2.6

iOS version:
iOS 13.3.1

Steps to reproduce:

  1. Create a UITableViewController, and make it conform to PanModalPresentable. Set the panScrollable property to be the tableView
  2. Add editing and move functionality to the tableView
  3. Display the panModal view, and try to move the first cell down the list

Expected result:

The item is able to be moved downwards successfully.

Actual result:

The panModal view is dismissed

Attachments:

Something to note here: Our designers want the cell to have swipe to delete and move functionality, so the move is being done by pressing and holding on a cell, and then dragging it. I'm not sure if this is what is causing the weird behavior or not. I'm still investigating.

@ste57
Copy link
Contributor

ste57 commented Feb 24, 2020

Hi @Jsayer7

Thanks for reporting and apologies for the delay. I think I may know what's causing this - the pan gesture recognizer on the pan modal would still be active when editing the tableView list so it thinks you want to dismiss instead of just edit. The quickest way to solve this would be to return false in func shouldRespond(to panModalGestureRecognizer: UIPanGestureRecognizer) -> Bool when editing begins on the tableView - that should stop the pan modal from dismissing. May/not be ideal but let me know if this works.

@ste57 ste57 closed this as completed Mar 25, 2020
@enasaz9
Copy link

enasaz9 commented May 13, 2020

@ste57 I want to disable the automatic dismiss of the panmodal too, I have imlemented the function mentioned above return false in func shouldRespond(to panModalGestureRecognizer: UIPanGestureRecognizer) -> Bool
but it's not getting called when I pull the panmodal view down.

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