Skip to Content
iPhone® Application Development All-In-One For Dummies®
book

iPhone® Application Development All-In-One For Dummies®

by Neal Goldstein, Tony Bove
February 2010
Beginner to intermediate
882 pages
19h 26m
English
For Dummies
Content preview from iPhone® Application Development All-In-One For Dummies®

Chapter 1. A User Interface for Adding Hotels and Using the Address Book

In This Chapter

  • Creating a user interface to add a hotel

  • Accessing the Address Book to use exiting information

  • Adding a hotel address to the Address Book

Although the ability to add hotels that you want to stay in is obviously important (staying in the hard-coded default hotel San Francisco is a bit awkward if you're in Needles, California, for example), it's also really helpful to integrate your Address Book with your application to avoid the annoying "double" entry.

In this chapter, I show you how to create a view that allows the user to both enter a hotel as well as add that hotel to his or her Address Book. I also show you how to take a hotel already in the Address Book and add it as a hotel in the RoadTrip application.

Being able to do that becomes even more important when you realize that, even though the title of the view says "Hotels," a hotel can really be any place you're planning to stay. This includes the couch at your best friend's former girl- or boyfriend's cousin's.

Add AddHotelController

As you might expect, the first thing you need to do is add a view controller to manage the data entry view, like so:

  1. In the RoadTrip project window, select the Classes folder and then choose File

    Add AddHotelController
  2. In the left column of the dialog, select Cocoa Touch Classes under the iPhone OS heading, select the UIViewController subclass ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

iPhone App Development: The Missing Manual

iPhone App Development: The Missing Manual

Craig Hockenberry
Objective-C

Objective-C

Jiva DeVoe
Beginning iPhone Development with Swift 3: Exploring the iOS SDK, Third Edition

Beginning iPhone Development with Swift 3: Exploring the iOS SDK, Third Edition

Molly Maskrey, Kim Topley, David Mark, Fredrik Olsson, Jeff Lamarche

Publisher Resources

ISBN: 9780470542934Purchase book