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

Swiping Through Cars

People expect gestures to be a part of apps, so much so that they try gestures in places where they think they should work. One common navigation gesture is swiping through detailed content. The car images view of the CarValet app already supports swipes, but the detail view does not.

Most of the work of adding swipe gestures is in the supporting code for changing the displayed car. Very little is specific to the swipe. These are the general steps to get swipes working:

1. Add a method for moving back and forth through the cars: nextOrPreviousCar: in CarTableViewController.

2. Enable both car detail controllers to call the new navigation method.

3. Add action selectors for the swipe gestures to the iPhone and iPad car detail ...

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