Present ViewController in NavigationController

To present a ViewController in a NavigationController you can wrap ViewController into a NavigationController as it is in the example below. Then present NavigationController which contains ViewController.

// Register Nib
 let newViewController = CustomSignupViewController(nibName: "CustomSignupViewController", bundle: nil)
 let navigationController = UINavigationController(rootViewController: newViewController)
 // Present View "Modally"
 self.present(navigationController, animated: true, completion: nil)

 


Leave a Reply

Your email address will not be published. Required fields are marked *