SvenTiigi / WhatsNewKit

Showcase your awesome new app features 📱
https://sventiigi.github.io/WhatsNewKit/
MIT License
3.92k stars 193 forks source link

Swipe gesture to dismiss doesn't work reliably #44

Closed francosolerio closed 4 years ago

francosolerio commented 4 years ago

WhatsNewKit Environment

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 commented 4 years ago

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 commented 4 years ago

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.

francosolerio commented 4 years ago

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

SvenTiigi commented 4 years ago

Hey @francosolerio,

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

francosolerio commented 4 years ago

Very good, thank you Sven!