iPad Go Home

Tapping a tab bar button in CarValet on the iPhone takes you back to the root view of that particular section. If you are viewing car details, tapping the tab button takes you back to the car table menu. On iPad, there is no similar control. Sometimes it is useful to set the iPad app back to a default state.

In this section, you implement a custom gesture recognizer for returning the iPad to its just-launched state: The master view shows the app sections menu, and the detail view has the default car valet tent picture.

For a gesture to work, the recognizer needs to be attached to a view. When the user taps in that view or any of its subviews, the system sends appropriate messages. The go home recognizer is attached to the current ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.