As a hint: If you call present to a ViewController
which is embedded inside a NavigationController
you have to set the NavigationController
to .fullScreen
and not the VC.
You can do this like @davidbates or you do it programmatically (like @pascalbros).
The same applies to the UITabViewController
An example scenario for NavigationController
:
//BaseNavigationController: UINavigationController {}
let baseNavigationController = storyboard!.instantiateViewController(withIdentifier: "BaseNavigationController")
var navigationController = UINavigationController(rootViewController: baseNavigationController)
navigationController.modalPresentationStyle = .fullScreen
navigationController.topViewController as? LoginViewController
self.present(navigationViewController, animated: true, completion: nil)