1

I have a login screen that pushes to a master-detail VC on successful auth.

Master Detail VC presented modally even when segue pushes it into the screen

However the screen following log in is always presented modally, this behavior started since iOS 13 (prior to that, login screen pushed to the initial VC, and another master VC linked VC had the menu)

To demonstrate, I took the final code from RW's master-detail view the tutorial, added a view with a button, linked button's action to master VC with a push segue. After this, even in the storyboard, you can see that the Master VC is presented modally. not pushed.

Attaching source code of modified code which shows what I want to demonstrate this

And a screenshot as well -

Ganesa Vijayakumar
  • 2,422
  • 5
  • 28
  • 41
akashlal.com
  • 356
  • 2
  • 12

3 Answers3

2

From the screen shot you've posted I can see that you don't have a navigation controller embedded to your initial view controller. So when you do a segue from your initial view controller via storyboard it'll present the view controller and presentation will not be fullscreen by default (in iOS 13).

You can change this setting via storyboard as well as in your view controller

In storyboard select your view controller and refer to the screenshot

enter image description here

For more detail refer to this question for full screen presentation

tryKuldeepTanwar
  • 3,490
  • 2
  • 19
  • 49
1

Try to change the kind to Present Modally and after that change the Presentation to Full Screen.

1

Programatically while presenting , add this code

if #available(iOS 13.0, *) {
     nextViewController.modalPresentationStyle = .fullScreen
   }
Suresh Mopidevi
  • 919
  • 3
  • 9
  • 24