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)

 

Check out the below video courses to learn more about Mobile App Development for iOS platform with Swift.

[raw_html_snippet id=”cookbookpagecoursesheader”]

Unit Testing Swift Mobile App

Apply Test-Driven Development(TDD) process to iOS mobile app development in Swift Preview this video course.