Search code examples
iosswiftstoryboardsegue

How to perform good looking segue on new iPhones


I'm looking for the best way to perform good looking segue.

My main goal is avoid the gap on the top of the screen and fill the whole screen (on iPhone 11 or XR etc.).

Here you can see what I mean (I used common Present Modally segue)

What solution are you using in your apps?


Solution

  • modalPresentationStyle is required to be set on the ViewController which is being presented.

    vc.modalPresentationStyle = .fullScreen
    

    and From storyboard you can do it like this

    enter image description here