Home > database >  Xcode 14 Storyboard, segue push forces Modal?
Xcode 14 Storyboard, segue push forces Modal?

Time:09-29

I am developing in Xcode 14 with Storyboards. I have set up several ViewControllers and when I add segues, the views become Modal and have a gap at the top. This is not what I want. I've tried each of the segue types and none of them allow the 2nd VC to present full-screen. Before and After screenshots below. How does one now use segues to push VCs without them looking like modals?

Before

After

CodePudding user response:

Xcode changed the default style years ago. To allow the 2nd VC to present full-screen:

In Xcode IDE, select segue, change its Kind to Present Modally and the presentation style to Full Screen. enter image description here

In Swift Code, you can assign viewcontroller's modalPresentationStyle to .fullScreen

  • Related