iOS 15 'Drag to Dismiss' Regression

It seems that iOS 15 has broken modal view controller 'drag to dismiss' under the following configuration:

  • The presented modal contains a nested scroll view
  • && the outer scroll view is horizontally scrollable

In iOS 13 and 14, UIScrollViews would propagate scroll events correctly, and despite the nested scroll view complexity, downwards scroll events would bubble up to the modal drag-to-dismiss gesture when appropriate.

In iOS 15, this seems to have broken (even for builds still targeting iOS 14). I'm presuming some of the internal logic for modal drag down changed to support the new sheet presentation APIs, and in doing so, nested scroll view support broke.

I'm curious as to how many others are running into this issue, and if anyone has found a workaround. I've submitted a bug report, although given how late it is in the beta cycle I'm not hopeful we'll see a fix before the public release of iOS 15.0.

(If anyone at Apple happens to be reading this, I've attached a demo project to FB9575496 demonstrating the issue).

Spent some more time digging - I went as far as disassembling UIKitCore to see what changed. While debugging I noticed some slight differences to a UIScrollView private method between iOS 14/15 (_findScrollableAncestorIfNeededWithEvent:).

By subclassing a scroll/collection view and overriding + returning nil from _parentScrollView, you can get the iOS 15 logic to more closely follow what iOS 14 does. This fixes the modal drag issue, but it's not exactly a great workaround... pretty sure Apple won't want us overriding this private API (who knows what other effect it might have).

Facing the same issue. Is there a workaround to fix this issue?

This is still not fixed in iOS 15.4.1

Does anyone know if the bug is acknowledged by Apple?

Faced the same bug. The only thing that "kinda" works for me is to add these lines:

if #available(iOS 15, *) {
    modalPresentationStyle = .fullScreen
}

If you are using the same workaround, don't forget to add some sort of a dismiss button.

alexeylobankov But this disables the swipe gesture. Right?

iOS 15 'Drag to Dismiss' Regression
 
 
Q