3

I have a view controller with a child view controller inside. This child view controller is a UITableView.

When I present the view controller modally using the UIModalPresentationStyle.pageSheet and the user drags down the UITableView the whole view controller is dragged down and it ends up being dismissed.

I'm looking for a way to disable that gesture in the UITableView. I found several posts on SO recommending to use isModalInPresentation = true or just use .fullScreen as UIModalPresentationStyle but that's not what I need. I want the user to be able to dismiss the view controller with a gesture if the user drags down the presented view controller from the navigation bar but not from the UITableView

I've already checked:

But those two are not the same scenario.

shim
  • 9,289
  • 12
  • 69
  • 108
Andres
  • 11,439
  • 12
  • 48
  • 87
  • If you turn off bouncing on the scroll view, seems to limit the behaviour somewhat so that it only occurs if the scroll down happens near the top of the view controller. Not a full fix, but something to consider. – shim Dec 20 '19 at 19:14

0 Answers0