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

Step 2: Updating CarTableViewController

The changes to CarTableViewController are quite small: removing the protocol, making the existing protocol methods public, and setting the ViewCarTableViewController block properties.

To save time, each of the blocks is a call to the original protocol method. If you were starting the design from scratch, you would do the work in the blocks instead of calling methods. Here’s what you do:

1. Open CarTableViewController.h and remove all references to ViewCarProtocol.

2. Add public declarations for each of the old protocol implementation methods:

- (CDCar *)carToView; - (void)carViewDone:(BOOL)dataChanged; - (void)nextOrPreviousCar:(BOOL)isNext;

At the moment, MainMenuViewController ...

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