-
Notifications
You must be signed in to change notification settings - Fork 472
Using Navigation Controllers
Anthony Sherbondy edited this page May 12, 2015
·
13 revisions
Push/pop navigation is one of the common types of navigation in iPhone apps, and it is easy to set up. A navigation controller manages a stack of view controllers. It is always initialized with a view controller and view controllers can be pushed onto the stack or removed from the stack.
Follow the steps below to set up a navigation controller using both Storyboard and programatically.
By default, navigation controllers provide a navigation bar with a back button. If you want to go back to the previous view controller using code, then you can call the popViewControllerAnimated method, as shown below.
navigationController!.popViewControllerAnimated(true)