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

Searching and displaying contacts

Sometimes it could be very interesting to build our own interface for searching contacts saved in the address book and for displaying the results. We'll build a simple form with a textbox where the user can type text. A button will be used for inputting the typed text and then we'll look for coincidences in our address book. The field chosen for our search will be the First name.

After finding contacts, we'll display a simple list with the results. When the user clicks on one of the items, the data for the selected contact will be displayed on a new page.

Getting ready

As with the other recipes in this chapter, we're going to use PhoneGap, UiUIKit, and XUI. Please, make sure you've installed these frameworks before ...

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