CarValet: Adding a Tab Bar

For a storyboard, you add a tab bar controller the same way you add a navigation controller: Select the root-view controller or controllers and then select Editor > Embed In > Tab Bar Controller. The selected view controllers all have to be at the same level of an application. This means you cannot select both a navigation controller, such as the add/view scene controller, and a subview of that controller, such as the car image scene controller.

Next, you add a tab bar controller to the CarValet app and include tabs for the add/view, car image, and about scenes. First, add the tab bar controller:

1. Add the CH07 Assets TabBar Icons folder that comes as part of the code for Chapter 7 to the Images.xcassets.

2. Open the ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming 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.