The Navigation Bar

The space at the top of the screen is the navigation bar, which appears atop any view controller managed by a UINavigationController. The navigation bar has room for three UI elements, from left to right:

  1. A left-side bar button item. For anything but the root view controller, this is typically a Back button, and a default back button will be provided if we don’t set a different bar button item of our own.

  2. A title, either as a string or as a custom view.

  3. A right-side bar button item.

We can easily customize all these things in the storyboard. First, as a bit of cleanup, we can get rid of that empty table controller that Xcode gave us, the one that was attached to the navigation controller. Select its view controller and press ...

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.