Sebastien Desemberg
Sebastien Desemberg

Reputation: 321

iOS 13 - Segue modally to a new storyboard nv/vc in full screen programmatically

With the new iOS 13 upgrade, my app now doesn't display my modally segues in full screen. How do I resolve this issue?

    let viewController:UIViewController = UIStoryboard(name: "Admin", bundle: nil).instantiateViewController(withIdentifier: "AdminNav") as UIViewController
    self.present(viewController, animated: true, completion: nil) 

Upvotes: 1

Views: 768

Answers (1)

Michcio
Michcio

Reputation: 2876

You need to set modalPresentationStyle to .fullScreen:

let viewController = UIStoryboard(name: "Admin", bundle: nil).instantiateViewController(withIdentifier: "AdminNav")
viewController.modalPresentationStyle = .fullScreen
present(viewController, animated: true, completion: nil) 

Upvotes: 2

Related Questions