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

Calling nextOrPreviousCar:

The iPad and iPhone car detail controllers need to send the new nextOrPreviousCar: method to their related car table menu. One way to do that is to make the new method public and then set a reference to the car table view in each detail view. An alternative is to expand the existing ViewCarProtocol and add a protocol-enabled delegate to the iPad car detail. Add the protocol and behavior by following these steps:

1. Add a new protocol message to ViewCarProtocol.h with the same signature as nexOrPreviousCar:, using the following lines:

@optional - (void)nextOrPreviousCar:(BOOL)isNext;

The message is optional because other classes support the protocol but might not need to move through cars. ...

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