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

Car Detail Controller

You already have a controller to show car detail on the iPhone storyboard. Better still, it uses a protocol to find what car to show and let a delegate know if there are changes. Follow these steps to show car detail:

1. Open the iPhone storyboard and set the ViewCarTableViewController storyboard ID so it’s the same as the class name.

2. Open MainMenuViewController.m and import ViewCarTableViewController.h. Now add instance variables for a current car and current controller below @implementation:

{     CDCar *currentCar;     ViewCarTableViewController *currentViewCarController; }

3. Add support for ViewCarProtocol to MainMenuViewController and copy the protocol methods to the end of the implementation: ...

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