Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to dismiss a modal view by swiping downward when in landscape mode?

Everything is in the title, I don't know why and I'm sure the answer is right in front of me but when in landscape mode, my modally presented view goes full screen and I can't dismiss it by swiping down. Is it a normal behavior ? Is there a way to make it possible ?

I've searched for an answer but I haven't found anything yet. I tried to play with the Attribute Inspector of my view, especially the modalPresentationStyle but nothing is working.

I've attached screenshots of my storyboard, no code is involved, the button is triggering segue set to "present modally". When in portrait mode, everything is fine. I'm using Xcode 12.1.

enter image description here

enter image description here

Thank you for your help !

like image 910
Prunsse Avatar asked Nov 19 '25 20:11

Prunsse


1 Answers

Yes, this looks like the default behavior. Even in native apps, you can't dismiss any modal presentation in the landscape.

The reason for this seems clear. In the landscape, it is presented fullscreen. Due to the full-screen presentation, it will not be an obvious gesture to swipe down to dismiss. And presenting the same as portrait mode is not possible because of the height available.

like image 145
Manish Punia Avatar answered Nov 22 '25 12:11

Manish Punia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!