Populating the View Car Scene with Data

To populate the view car scene with data, you need a custom class for the scene’s view controller. Follow these steps:

1. Add the class ViewCarTableViewController, based on UITableViewController, and make sure it is included in the CarValet target. Set it as the controller class for the view car scene.

2. Add the following code shown in bold to ViewCarTableViewController.h:

#import <UIKit/UIKit.h> @class Car; @interface ViewCarTableViewController : UITableViewController @property Car *myCar;

This code should look very familiar. It is almost identical to the header for the prototype car cell. This is because the view car scene needs a Car object to view and edit.

3. Open ...

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.