iosobjective-ciphoneabaddressbook

Use Address Book as Data Source


I am going to use Address Book as my app's data source for use to add new contact or select a contact. The contact is mainly for company or organization, but it can be a person.

For adding a new contact, I would like to show a list of contacts, like people pick control:

alt text http://developer.apple.com/iphone/library/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Art/people_picker.jpg

However, I cannot figure out to change Cancel to Add, and Groups as Cancel. It looks like that there is no way I can set this controller' navigation bar to Add. Basically, I would like to display a list of contacts to choose as my add data source, and to provide Add function in the same view if user wants to add new one to the contact first and as data source.

Apple's Address Book Programming Guideline does provide one ABNewPersonViewController to add a new contact. Is there any way to add this to all contacts picker as its navigation tree? Does any one see similar example codes in Apple's example list(just too many to find out)?

Another related issue is that when the people picker controller is shown, it appears with animation from bottom up. Is there any way to control its animation from left just like navigation drill-down animation?


Solution

  • My recommendation: use a ABPeoplePickerNavigationController and add a toolbar to the bottom that has an Add button. The Add button would open a ABNewPersonViewController.