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

Moving Through Cars

You need to add a method to move to the next or previous car. The hardest part is figuring out the next row, especially because there can be multiple sections. Next should go to the first car of the next section or wrap around to the beginning of the first section from the last car. Previous should go backward through the list of cars, moving to the last car when a section changes or to the last car from the first car.

Use the project you were using for Chapter 11, “Navigation Controllers II: Split View and the iPad,” or use CH12 CarValet Starter from the sample code from this chapter. First, add code for moving to the next or previous car. There are three routines to do this, shown in Listings 12-1, 12-2, and 12-3. You need ...

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