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

Swipe gesture to dismiss doesn't work reliably #44

Closed
francosolerio opened this issue Aug 19, 2020 · 5 comments
Closed

Swipe gesture to dismiss doesn't work reliably #44

francosolerio opened this issue Aug 19, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@francosolerio
Copy link

WhatsNewKit Environment

  • WhatsNewKit version: 1.3.5
  • Xcode version: 11.6
  • Swift version: 5
  • macOS version running Xcode: 10.15.5
  • Dependency manager (SPM, Carthage, CocoaPods, Manually): SPM or standalone

What did you do?

Build and run WhatsNewKit-Example

Tap "Present" button

Put finger on the ItemsView and drag down

What did you expect to happen?

The WhatsNew panel should begin dismiss animation and follow the finger's movement

What happened instead?

The WhatsNew panel doesn't move at all 90% of the times. Sometimes it begins moving late after the gesture has moved a considerable amount of space. Rarely it begins immediately and follows the gesture.

@francosolerio
Copy link
Author

francosolerio commented Aug 19, 2020

Personal consideration: the interference between swipe to dismiss / scrollview gestures is handled automatically when a modally presented panel contains a UITableViewController subclass. Maybe using a UIViewController subclass containing a UITableView for ItemsView needs the same behavior to be coded manually with some UIGestureRecognizerDelegate method.

@SvenTiigi
Copy link
Owner

Hey @francosolerio,

Thanks for your bug report 🙌

It seems like that the following line of code causes the issue (WhatsNewItemsViewController.swift):

tableView.alwaysBounceVertical = false

When the contentSize of the TableView doesn't exceed the size of the frame the TableView will ignore the scroll gesture and therefore it will be not passed down to the responder chain in order to allow iOS to listen to the scroll gesture.

Please check out the develop branch and check if the problem still exists.

@SvenTiigi SvenTiigi added the bug Something isn't working label Aug 19, 2020
@francosolerio
Copy link
Author

Thank you @SvenTiigi,
I can confirm the issue is resolved on the develop branch.

@SvenTiigi
Copy link
Owner

Hey @francosolerio,

Just wanted to let you know that this bug fix is now available within the latest release 1.3.6

@francosolerio
Copy link
Author

Very good, thank you Sven!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants