When having to deal with a number of screens, and the hierarchy at which they will appear, one may find it handy to use a navigation controller. A navigation controller is a container view controller that manages all the view controllers that were assigned to it. 

  • All the view controllers managed by the navigation controller are called its child view controllers.
  • The first screen that the navigation controller presents is called the "root view controller". 
  • A navigation controller handles its child view controllers using an ordered array, known as the navigation stack. 
  • You add and remove view controllers from the stack using segues. 
  • The navigation controller manages the navigation bar. The navigation bar is always present and is managed by the navigation controller itself. 

How to use?

If you want your launch view controller to be presented through a navigation controller then all you have to do is enable the "Start with Navigation Controller" switch.

If you want a specific view controller to be set as root view controller, all you have to do is when creating a segue, to check the "Set as Root View Controller" option.

If you want to push a view controller (add it to the navigation stack) all you have to do is check the "Push in Navigation Controller" option.

if you don't have a navigation controller from the launch view controller of your app and you want to create one later then, when creating the segue enable the "Create Navigation Controller" switch.

Did this answer your question?