O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required