O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

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

Selecting contacts

Thanks to this recipe we'll learn how to select a contact from the address book of the iPhone and to display its related information. Our goal is quite simple; when the user clicks on a button, a new screen will display all available contacts. After clicking on one of these elements, the complete name of the selected contact will be displayed in the main screen.

Although this recipe is very simple, you can apply it for building complex applications that require dealing with contacts available through the address book of the iPhone.

The complete code for this recipe can be reached at code/ch08/queryAddress in the code bundle provided on the Packtpub site.

Getting ready

For this recipe we'll use three different frameworks: PhoneGap, ...

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