swiftpresentmodalviewcontrollerios13

Is it possible to use swipe to dismiss while presenting a fullscreen modal in iOS 13?


With the new default card modal presentation in iOS 13, there is a nice feature that is swipe to dismiss. Is it possible to use this feature while presenting a classic .fullscreen modal?

I checked and if isModalInPresentation is false while presenting in fullscreen.

Any ideas?


Solution

  • It seems that the swipe to dismiss will only work if the modal is presented as a sheet, as stated in this year's wwdc:

    Now, what do you all have to do to support Pull to Dismiss? In general, nothing. If you present something as a Sheet, the ability to pull it down comes for free.

    And it makes sense. When you present it as a sheet, the UI makes it look like you can swipe the modal down. When you present it on fullscreen, it would not be intuitive for the user that he should swipe the page down to dismiss. I'd rather use a button on this case.