Adding Cars

Unlike About and Images, the first part of adding Cars updates the menu controller. On the iPhone app, the Cars tab has four functions: add cars, remove cars, view cars, and select a car to view detail. Only the last function, viewing a car, changes the detail content.

The first step is showing a car table when the Cars menu item is tapped. There is a car table on the iPhone storyboard, and you already know how to load a controller from there:

1. Add an identifier to the CarTableViewController on the iPhone storyboard.

2. Show the new controller in the menu view. Do this by changing the kPadMenuCarsItem switch case to the code shown in Listing 11-9.

Listing 11-9 Showing a Car Table

... case kPadMenuCarsItem: ...

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.