Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

17. Connecting to the Address Book > Recipe: Picking People

Recipe: Picking People

The AddressBookUI framework offers a people picker controller, which lets you browse your entire contacts list. It works similarly to the individual contact screen, but does not require an a priori contact selection. The ABPeoplePickerNavigationController class presents the interactive browser shown in Figure 17-4.

image

Figure 17-4 The iPhone people picker navigation control enables users to search through the contacts database and select a person or organization.

Allocate and display the controller before presenting it modally. Make sure to set the peoplePickerDelegate property, which allows you to catch user interactions with the view.

- (void) action: (UIBarButtonItem *) bbi
{
    ABPeoplePickerNavigationController *ppnc =
        [[ABPeoplePickerNavigationController alloc] init];
    ppnc.peoplePickerDelegate = self;
    [self presentModalViewController:ppnc animated:YES];
}


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial