You are previewing iPhone® Application Development All-In-One For Dummies®.
O'Reilly logo
iPhone® Application Development All-In-One For Dummies®

Book Description

One-stop shopping for every aspect of iPhone development!

Whether you're a beginning programmer who wants to build an application for your iPhone or you're a professional developer looking to leverage the marketing power of the open iPhone SDK, this helpful guide has your needs covered. iPhone enthusiast and developer Neal Goldstein shows you the ins and outs of developing applications for the iPhone and iPod Touch and explains how to get your apps into the AppStore and market and sell them.

You'll learn the basics of getting started, download the SDK, context-based design, and fill your toolbox. Clear, easy-to-understand steps walk you through programming with Objective C or Cocoa and show you how to develop games and graphics. Plus, you'll discover how to design specifically for mobile apps.

  • Aimed at both novice and seasoned developers who are interested in developing iPhone and iPod Touch applications

  • Shows you how to get started, download the SDK, and fill your toolbox

  • Walks you through developing games and graphics

  • Explains how to gets your apps into the AppStore and sell them

Getting started developing your own applications today with this fun and friendly guide.

Table of Contents

  1. Copyright
  2. About the Authors
  3. Authors' Acknowledgments
  4. Publisher's Acknowledgments
  5. Introduction
    1. About This Book
    2. Conventions Used in This Book
    3. Foolish Assumptions
    4. How This All-in-One Book Is Organized
      1. Book I: Creating the Killer App
      2. Book II: Objective-C and iPhone Technologies
      3. Book III: Building a Utility App — DeepThoughts
      4. Book IV: Debugging and Tuning Your Application
      5. Book V: Building an Industrial Strength Application — RoadTrip!
      6. Book VI: Storing and Accessing Data
      7. Book VII: Extending the App to the Realm of Ultracool
    5. Where to Go from Here
  6. Book I. Creating the Killer App
    1. 1. What Makes a Killer iPhone App
      1. 1.1. Figuring Out What Makes a Great iPhone Application
      2. 1.2. Exploiting the Platform
        1. 1.2.1. Device-guided design
        2. 1.2.2. Exploiting the features
          1. 1.2.2.1. Accessing the Internet
          2. 1.2.2.2. Knowing the location of the user
          3. 1.2.2.3. Tracking orientation and motion
          4. 1.2.2.4. Tracking the action of the user's fingers on the screen
          5. 1.2.2.5. Playing audio and video
          6. 1.2.2.6. Accessing the user's contacts
          7. 1.2.2.7. Accessing the user's pictures and camera
      3. 1.3. Embracing the iPhone's Limitations
        1. 1.3.1. Living with the small screen
        2. 1.3.2. Designing for fingers
        3. 1.3.3. Balancing limited computer power, memory, and battery life
      4. 1.4. Why Develop iPhone Applications?
      5. 1.5. Developing with Apple's Expectations in Mind
      6. 1.6. An Overview of the Development Cycle
      7. 1.7. The Sample Applications
      8. 1.8. What's Next
    2. 2. Creating a Compelling User Experience
      1. 2.1. Deep Thoughts on the User Experience
      2. 2.2. Creating Compelling Content
        1. 2.2.1. Focusing on the task at hand
        2. 2.2.2. Maintaining consistency with the user's world
        3. 2.2.3. Modeling actions on the real world
      3. 2.3. Designing the User Interface — Form Follows Function
        1. 2.3.1. Consistency across apps is a good thing
        2. 2.3.2. Making it obvious
        3. 2.3.3. Engaging the user
      4. 2.4. Designing the User Experience
        1. 2.4.1. Understanding the real-world context
          1. 2.4.1.1. Become the champion of relevance
          2. 2.4.1.2. Seconds count
        2. 2.4.2. Doing it better on the iPhone
          1. 2.4.2.1. The quality of information has to be better than the alternative
          2. 2.4.2.2. The app has to be worth the real cost
          3. 2.4.2.3. Keep things localized
      5. 2.5. Playing to the iPhone Strengths
        1. 2.5.1. Knowing the location of the device
        2. 2.5.2. Accessing the Internet
        3. 2.5.3. Recording and playing content
        4. 2.5.4. Tracking orientation and motion
      6. 2.6. Incorporating the Device Context
      7. 2.7. Avoiding Practices that Get Apps Rejected
    3. 3. Enlisting in the Developer Corps
      1. 3.1. Becoming a Registered iPhone Developer
      2. 3.2. Joining the iPhone Developer Program
      3. 3.3. Exploring the iPhone Dev Center
        1. 3.3.1. Looking forward to using the SDK
        2. 3.3.2. Resources in the iPhone Dev Center
      4. 3.4. Downloading the SDK
      5. 3.5. Getting Yourself Ready for the SDK
    4. 4. Getting to Know the SDK
      1. 4.1. Developing Using the SDK
      2. 4.2. Creating Your Xcode Project
      3. 4.3. Exploring Your Project
      4. 4.4. Building and Running Your Application
      5. 4.5. The iPhone Simulator
        1. 4.5.1. Hardware interaction
        2. 4.5.2. Gestures
        3. 4.5.3. Uninstalling apps and resetting your device
        4. 4.5.4. Limitations
      6. 4.6. Customizing Xcode to Your Liking
      7. 4.7. Using Interface Builder
      8. 4.8. It's Time to Explore
    5. 5. Looking Behind the Screen
      1. 5.1. Using Frameworks
      2. 5.2. Using Design Patterns
        1. 5.2.1. The Model-View-Controller (MVC) pattern
        2. 5.2.2. The MVC in action
      3. 5.3. Working with Windows and Views
        1. 5.3.1. Looking out the window
        2. 5.3.2. Admiring the view
          1. 5.3.2.1. What views do
          2. 5.3.2.2. The view hierarchy
        3. 5.3.3. The kinds of views you use
          1. 5.3.3.1. Container views
          2. 5.3.3.2. Controls
          3. 5.3.3.3. Display views
          4. 5.3.3.4. Text and Web views
          5. 5.3.3.5. Alert views and action sheets
          6. 5.3.3.6. Navigation views
          7. 5.3.3.7. The window
      4. 5.4. Controlling View Controllers
      5. 5.5. What About the Model?
      6. 5.6. Adding Your Own Application's Behavior
        1. 5.6.1. The Delegation pattern
        2. 5.6.2. The Target-Action pattern
      7. 5.7. Doing What When?
      8. 5.8. Whew!
    6. 6. Death, Taxes, and iPhone Provisioning
      1. 6.1. How the Process Works
        1. 6.1.1. The Distribution process
        2. 6.1.2. The Development process
      2. 6.2. Provisioning Your Device for Development
      3. 6.3. Creating Your Development Provisioning Profile and Development Certificate
      4. 6.4. Provisioning Your Application for the App Store
      5. 6.5. Using iTunes Connect to Manage Apps in the App Store
      6. 6.6. Supplying the Information Required for the App Store
        1. 6.6.1. Adding the metadata and artwork
        2. 6.6.2. You're not done yet
        3. 6.6.3. Uploading your information
        4. 6.6.4. Uploading your app and its data
      7. 6.7. Avoiding the App Store Rejection Slip
      8. 6.8. Now What?
    7. 7. The App Store Is Not Enough
      1. 7.1. Why People Buy Apps from the App Store
        1. 7.1.1. Finding out how to reach your potential customers
        2. 7.1.2. Marketing 101: Pricing your app
      2. 7.2. Knowing Your Customers
        1. 7.2.1. Tracking downloads
        2. 7.2.2. Adding analytical code to your app
        3. 7.2.3. Putting ads in your app
      3. 7.3. Deploying the In App Purchase Feature
      4. 7.4. Links Are Not Enough
        1. 7.4.1. Using iTunes affiliate links
        2. 7.4.2. Making use of user reviews
        3. 7.4.3. Going social
        4. 7.4.4. Updating your app for attention
        5. 7.4.5. Buying advertising and publicity
  7. Book II. Objective-C and iPhone Technologies
    1. 1. Using Objective-C's Extensions to C for iPhone Development
      1. 1.1. What You Need to Know About Objective-C
      2. 1.2. Introducing Objects and Classes
        1. 1.2.1. Grasping objects and their classes
        2. 1.2.2. Scoping instance variables
        3. 1.2.3. Spreading the wealth across files
        4. 1.2.4. Knowing the naming conventions
        5. 1.2.5. Using id and nil
      3. 1.3. Declaring the Class Interface
        1. 1.3.1. The @interface compiler directive and first line
        2. 1.3.2. The instance variables
        3. 1.3.3. The methods
        4. 1.3.4. The @end compiler directive
      4. 1.4. The Implementation — Coding the Methods
        1. 1.4.1. The @implementation compiler directive
        2. 1.4.2. Defining the methods
        3. 1.4.3. The @end compiler directive
      5. 1.5. Allocating Objects
        1. 1.5.1. All objects are dynamic
        2. 1.5.2. Initialization
      6. 1.6. Sending Messages to Your Objects
      7. 1.7. Working with Declared Properties
        1. 1.7.1. Adding properties
        2. 1.7.2. Accessing the properties from within the class
        3. 1.7.3. Releasing the object assigned to a property
        4. 1.7.4. Using accessor methods to get data from objects
        5. 1.7.5. Properly using properties
      8. 1.8. Extending the Program
        1. 1.8.1. Inheritance
        2. 1.8.2. Delegation
    2. 2. The Real Truth about Object-Oriented Programming
      1. 2.1. Not All Modules Are Created Equal
      2. 2.2. Understanding How Objects Behave
      3. 2.3. Seeing the Concepts in Action
        1. 2.3.1. Encapsulation
        2. 2.3.2. Polymorphism
      4. 2.4. How Inheritance Works
        1. 2.4.1. Knowing what inheritance enables you to do
        2. 2.4.2. Using inheritance effectively
      5. 2.5. Implementing Inheritance in a Program
        1. 2.5.1. Deriving classes
        2. 2.5.2. Replacing a control structure with polymorphism
        3. 2.5.3. The final word on polymorphism and inheritance
      6. 2.6. Encapsulating Objects
        1. 2.6.1. Getting to know the Model-View-Controller (MVC) pattern
        2. 2.6.2. Implementing the MVC pattern
      7. 2.7. Looking Ahead
    3. 3. Digging Deeper Into Objective-C
      1. 3.1. Initializing Objects
        1. 3.1.1. Invoking the superclass's init method
        2. 3.1.2. Initializing instance variables
        3. 3.1.3. Returning self
      2. 3.2. Raising and Terminating Responsible Objects
        1. 3.2.1. Understanding the object lifecycle
        2. 3.2.2. Using reference counting
      3. 3.3. Running the Static Analyzer
      4. 3.4. Plugging the Leaks
      5. 3.5. Attending to Memory Management Subtleties — Arrays and Autorelease
        1. 3.5.1. Considering objects in arrays
        2. 3.5.2. Understanding autorelease
        3. 3.5.3. Using the autorelease pool
      6. 3.6. Some Basic Memory Management Rules You Shouldn't Forget
    4. 4. Leveraging the Foundation Framework in Your App
      1. 4.1. Useful Utility Classes
      2. 4.2. Container Classes
      3. 4.3. Taking Advantage of Array Objects
        1. 4.3.1. Tiptoeing through an array
        2. 4.3.2. Working with fixed arrays
        3. 4.3.3. Using C arrays
        4. 4.3.4. Expanding to multidimensional arrays
      4. 4.4. Using Dictionaries
        1. 4.4.1. Understanding a dictionary's keys and values
        2. 4.4.2. Creating a dictionary
      5. 4.5. Using Property Lists
        1. 4.5.1. Working with property lists
        2. 4.5.2. Adding a property list to your project
        3. 4.5.3. Using plists
        4. 4.5.4. Creating a mutable dictionary
        5. 4.5.5. Creating, initializing, and using the symbol string
      6. 4.6. Dictionaries of Dictionaries
        1. 4.6.1. Managing a dictionary of dictionaries
      7. 4.7. Modifying the Property List
        1. 4.7.1. Adding a new entry to the property list
          1. 4.7.1.1. Checking to see if the dictionary is there
          2. 4.7.1.2. Creating the new entry if it's not there
          3. 4.7.1.3. Getting the data stored in the dictionary if it's there
        2. 4.7.2. Updating the dictionary
    5. 5. Getting Other Objects to Do Your Work for You
      1. 5.1. Understanding Delegation
      2. 5.2. Using Protocols
        1. 5.2.1. Declaring a protocol
        2. 5.2.2. Adopting a protocol
      3. 5.3. Adding delegation to Transaction
      4. 5.4. Categories
        1. 5.4.1. Using categories
        2. 5.4.2. Defining informal protocols
  8. Book III. Building a Utility App — DeepThoughts
    1. 1. Understanding How an App Runs
      1. 1.1. App Anatomy 101 — The Lifecycle
        1. 1.1.1. It all starts with the main nib file
        2. 1.1.2. Initialization
      2. 1.2. Termination
      3. 1.3. Other Runtime Considerations
        1. 1.3.1. Responding to interruptions
        2. 1.3.2. Seeing how memory management works on the iPhone
          1. 1.3.2.1. Observing low-memory warnings
          2. 1.3.2.2. Avoiding the warnings
          3. 1.3.2.3. Some basic memory-management rules you shouldn't forget
          4. 1.3.2.4. Reread this section!
      4. 1.4. Whew!
    2. 2. Understanding the User Interface Controls
      1. 2.1. Running the Utility Application Template
      2. 2.2. Inspecting the Main View
        1. 2.2.1. Initializing the Main view
        2. 2.2.2. Controller a subset of UIViewController
        3. 2.2.3. Main view a subset of UIView
      3. 2.3. Inspecting the Flipside View
        1. 2.3.1. MainViewController initializes the Flipside view
        2. 2.3.2. Flipside view a subset of UIView
      4. 2.4. Unraveling the Info and Done Buttons
        1. 2.4.1. Info connects to showinfo
        2. 2.4.2. Done sends an action to FlipsideViewController
      5. 2.5. Understanding Event Processing
    3. 3. Developing the Main View
      1. 3.1. Using the Xcode Text Editor
      2. 3.2. Accessing Documentation
        1. 3.2.1. Quick Help
        2. 3.2.2. The header file for a symbol
        3. 3.2.3. Documentation window
        4. 3.2.4. Help menu
        5. 3.2.5. Find
      3. 3.3. Where Does Your Code Go?
        1. 3.3.1. The delegate object
        2. 3.3.2. The controller object
      4. 3.4. Creating an Animated View
        1. 3.4.1. The viewDidLoad method
        2. 3.4.2. Drawing the view
        3. 3.4.3. The animation block
      5. 3.5. Testing the Main View
    4. 4. Developing the Flipside Controls
      1. 4.1. Respecting User Preferences
      2. 4.2. Setting Up User Preferences
        1. 4.2.1. Identifying preferences for NSUserDefaults
        2. 4.2.2. Adding a Constants.h file
      3. 4.3. Reading Preferences into the App
      4. 4.4. Setting Up Preferences for the Settings App
        1. 4.4.1. Adding a Settings bundle to your project
        2. 4.4.2. Setting up the property list
        3. 4.4.3. Testing your app with the Settings app
      5. 4.5. Setting Up Preferences in the Flipside View
        1. 4.5.1. Objective-C properties
        2. 4.5.2. Adding methods for the interface objects
      6. 4.6. Connecting the Interface Objects in Interface Builder
    5. 5. Extending Your App with a Photo View
      1. 5.1. Adding a Second View
        1. 5.1.1. Initializing view controllers in the app delegate
        2. 5.1.2. Discovering how horizontal scrolling works
        3. 5.1.3. Playing the memory management game
      2. 5.2. Implementing the Photo View
        1. 5.2.1. Creating subclasses of UIView and UIViewController
        2. 5.2.2. Creating a nib file for the Photo view
        3. 5.2.3. Modifying the window nib file for scrolling
      3. 5.3. Animating the Photo View
        1. 5.3.1. Reusing MainViewController code for PhotoViewController
        2. 5.3.2. Adding a default image
      4. 5.4. Accessing Media on the iPhone
      5. 5.5. Adding an Application Icon
      6. 5.6. A Lot Accomplished Very Quickly
  9. Book IV. Debugging and Tuning Your Application
    1. 1. Using the Xcode Debugger
      1. 1.1. Understanding Bugs
      2. 1.2. Using the Debugger
        1. 1.2.1. Debugging in the Text editor
        2. 1.2.2. Using the Debugger window
        3. 1.2.3. Using the Mini Debugger
        4. 1.2.4. Using the Console
      3. 1.3. Using Breakpoints
      4. 1.4. Using the Static Analyzer
    2. 2. Tuning Your Code Using Xcode's Instruments Application
      1. 2.1. Getting Started with the Instruments Application
        1. 2.1.1. A Leaks instrument preview
        2. 2.1.2. Actually using the Leaks instrument
      2. 2.2. Yes Virginia, There Are Zombies Amongst Us
  10. Book V. Building an Industrial Strength Application — RoadTrip!
    1. 1. Designing Your Application
      1. 1.1. Defining the Problems
      2. 1.2. Creating the Program Architecture
        1. 1.2.1. Models
        2. 1.2.2. Views
        3. 1.2.3. Models yet again
        4. 1.2.4. View controllers
        5. 1.2.5. Stored data mode, saving state, and localization
      3. 1.3. Understanding the Iterative Nature of the Process
    2. 2. Setting the Table
      1. 2.1. Understanding Table Views
      2. 2.2. Creating the Table View
      3. 2.3. Creating and Formatting a Grouped Table View
      4. 2.4. Making UITableViewController Work for You
        1. 2.4.1. Adding sections
        2. 2.4.2. Adding titles for the sections
        3. 2.4.3. Localization
      5. 2.5. Creating the Row Model
      6. 2.6. Seeing How Cells Work
        1. 2.6.1. Using vanilla cell objects
        2. 2.6.2. Adding subviews to a cell's Content view
        3. 2.6.3. Creating a custom subclass UITableViewCell
      7. 2.7. Creating the Cell
      8. 2.8. And Now . . .
    3. 3. Navigating
      1. 3.1. Working with User Selections
        1. 3.1.1. Navigating the navigation controller
        2. 3.1.2. Implementing the selection
      2. 3.2. Saving and Restoring State
        1. 3.2.1. Saving state information
        2. 3.2.2. Restoring the state
      3. 3.3. Respecting User Preferences
        1. 3.3.1. Adding a Settings bundle to your project
        2. 3.3.2. Setting up the property list
      4. 3.4. Reading Settings in the Application
      5. 3.5. Using Preferences in Your Application
    4. 4. Creating Controllers and Model Classes
      1. 4.1. Specifying the Content
      2. 4.2. Creating the View Controller, Nib, and Model Files
        1. 4.2.1. Adding the controller and nib file
        2. 4.2.2. Setting up the nib file
      3. 4.3. Getting Trippy with the Trip Model
        1. 4.3.1. Working with controllers
        2. 4.3.2. Managing links in Web view Web sites
        3. 4.3.3. Keeping users from going astray
      4. 4.4. Implementing CarInformation
        1. 4.4.1. Setting up the view
      5. 4.5. Implementing CarServicingInformation
        1. 4.5.1. Setting up the view
      6. 4.6. What's with the Trip Model and All That Indirection?
      7. 4.7. What's Next?
    5. 5. Finding Your Way
      1. 5.1. Building Your Map Functionality
        1. 5.1.1. Setting up the nib file
      2. 5.2. Putting MapKit through Its Paces
        1. 5.2.1. MKMapView
        2. 5.2.2. Enhancing the map
          1. 5.2.2.1. Adding landscape mode and the current location
          2. 5.2.2.2. It's about the region
          3. 5.2.2.3. Dealing with failure
        3. 5.2.3. Adding annotations
          1. 5.2.3.1. The annotation
          2. 5.2.3.2. Displaying the annotations
        4. 5.2.4. Going to the current location
      3. 5.3. And There's Even More
    6. 6. Geocoding and Reverse Geocoding
      1. 6.1. Reverse Geocoding
      2. 6.2. (Forward) Geocoding
        1. 6.2.1. Adding the FindLocationController and nib file
      3. 6.3. What's Next?
  11. Book VI. Storing and Accessing Data
    1. 1. Show Me the Data
      1. 1.1. Seeing the Sights
      2. 1.2. Starting with the Table View
        1. 1.2.1. Adding the controller
        2. 1.2.2. Setting up the controller
        3. 1.2.3. Creating the SightListController in the RootViewController
      3. 1.3. Seeing the Sights
      4. 1.4. Sight.plist Is a Plist
        1. 1.4.1. Working with property lists
      5. 1.5. Adding a plist to Your Project
        1. 1.5.1. Adding images
      6. 1.6. Initializing the Sight Objects with plist Data
        1. 1.6.1. Categories and extensions
        2. 1.6.2. Loading the Sights
        3. 1.6.3. Tiptoeing through an array
        4. 1.6.4. Using dictionaries
          1. 1.6.4.1. Understanding a dictionary's keys and values
        5. 1.6.5. The Sight object initializes itself with the plist dictionary
      7. 1.7. Displaying the Sights in the SightListController Table View
      8. 1.8. Drawing the Thumbs
      9. 1.9. Compile and Run RoadTrip
      10. 1.10. Houston, We Have a Problem . . .
        1. 1.10.1. The problem being . . .
    2. 2. A More Flexible Generic Controller
      1. 2.1. Seeing How the Old School Generic Controller Worked
        1. 2.1.1. Stepping through the process
        2. 2.1.2. The problem being . . .
      2. 2.2. Understanding Delegation
        1. 2.2.1. Naming conventions
      3. 2.3. Using Protocols
        1. 2.3.1. Declaring a protocol
        2. 2.3.2. Adding delegation to WebViewController
        3. 2.3.3. Changing the way WebViewController is instantiated and initialized
        4. 2.3.4. Adopting a protocol
      4. 2.4. Asynchronous File Loading
    3. 3. Working the URL Loading System
      1. 3.1. URL Loading System Overview
        1. 3.1.1. Authentication and credentials
        2. 3.1.2. Cookie storage
        3. 3.1.3. Protocol support
        4. 3.1.4. Using NSURLConnection — Downloading data asynchronously
          1. 3.1.4.1. connection:didReceiveResponse:
          2. 3.1.4.2. connection:didReceiveData:
          3. 3.1.4.3. connection:didFailWithError:
          4. 3.1.4.4. connectionDidFinishLoading:
        5. 3.1.5. One more thing
      2. 3.2. Implementing Sight with Asynchronous Downloads
        1. 3.2.1. Sending the right message
        2. 3.2.2. Getting Trip in on the action
      3. 3.3. Adding Delegation and the URL Loading System to the Rest of the Model Objects
      4. 3.4. What About the Map?
      5. 3.5. Where Are You?
    4. 4. Setting Up Core Data
      1. 4.1. Core Data Basics
      2. 4.2. Starting with the Objects
        1. 4.2.1. Add the Attributes
        2. 4.2.2. Add relationships
        3. 4.2.3. Generate your classes
        4. 4.2.4. Managed objects
      3. 4.3. The Managed Object Context
      4. 4.4. The Persistent Store Coordinator and Persistent Store
      5. 4.5. The Core Data Stack
        1. 4.5.1. "Coding" the stack
        2. 4.5.2. Adding the Core Data Framework
        3. 4.5.3. Connecting the pieces
      6. 4.6. What's in the Core Data Stack
        1. 4.6.1. The Managed Object Context
        2. 4.6.2. The Persistent Store Coordinator
        3. 4.6.3. The Managed Object Model
      7. 4.7. Putting Core Data to Work
    5. 5. Putting Core Data to Work
      1. 5.1. Understanding the Fetch Request
      2. 5.2. Getting the Ball Rolling
      3. 5.3. Adding HotelController
        1. 5.3.1. Setting up the controller
        2. 5.3.2. Repurposing the code from the template
        3. 5.3.3. Modifying viewDidLoad
        4. 5.3.4. Creating a fetched results controller
        5. 5.3.5. Adding a new hotel
        6. 5.3.6. Table view methods
        7. 5.3.7. The fetched results controller's delegate
        8. 5.3.8. Managing memory
        9. 5.3.9. You now have someplace to stay
      4. 5.4. Supporting Undo
        1. 5.4.1. Supporting undo in HotelController
        2. 5.4.2. Keeping tabs on your Undo manager
      5. 5.5. Adding Delete
      6. 5.6. What's Left
  12. Book VII. Extending the App to the Realm of Ultracool
    1. 1. A User Interface for Adding Hotels and Using the Address Book
      1. 1.1. Add AddHotelController
        1. 1.1.1. Adding controls to the view
        2. 1.1.2. Setting up the controller
      2. 1.2. Making the Connections in Interface Builder
      3. 1.3. Adding Some Code to Actually Add Some Functionality
        1. 1.3.1. Dismissing the controller
      4. 1.4. Entering and Saving the Hotel Information
        1. 1.4.1. Dismissing the keyboard
        2. 1.4.2. Adding Cancel and Save buttons
        3. 1.4.3. Setting up the AddHotelController delegate
        4. 1.4.4. Adding the delegation plumbing
        5. 1.4.5. Using default data
      5. 1.5. Interfacing with the Address Book Application
        1. 1.5.1. Adding a hotel to your Address Book
    2. 2. Incorporating E-Mail: Postcards from the Road
      1. 2.1. Mail on the iPhone
        1. 2.1.1. The usual start to your adventure
        2. 2.1.2. Adding the MessageUI framework
      2. 2.2. Creating the Interface
        1. 2.2.1. Selecting the new entry
        2. 2.2.2. Reusing what you've already done in RoadTripController
      3. 2.3. Creating the Mail Message
        1. 2.3.1. Displaying the view
        2. 2.3.2. The delegate
      4. 2.4. More
    3. 3. Are We There Yet?
      1. 3.1. Adding Core Location
      2. 3.2. Taking the Accelerometer for a Spin
        1. 3.2.1. Doing something with the shake
      3. 3.3. Yes, You're Finally There