Navigation Controllers

The most common way to work with multiple view controllers is to use a navigation controller—a view controller that manages a stack of child view controllers. This UINavigationController will become the new point of entry to the storyboard. Our current RootViewController is the the first thing it shows. Then we’ll add more view controllers, and the navigation controller will keep track of which one we’re looking at and how to go back to earlier ones in the stack.

We won’t have to write a new class for this, as the UINavigationController is meant to be used as is and is seldom subclassed.

Actually, we don’t need to write code at all to use a navigation controller; we can do everything in the storyboard. In fact, the best ...

Get iOS 9 SDK Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.