Use address book as data source

I am going to use the address book as an application data source to use to add a new contact or select a contact. Contact is mainly for a company or organization, but it can be a person.

To add a new contact, I would like to show a list of contacts, for example, people choose a control:

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

However, I cannot figure out how to change Cancel to Add and Groups as Cancel. It seems like I cannot configure the controller navigation bar to add. Basically, I would like to display the list of contacts to select as the source for adding data and provide the Add function in the same view if the user wants to first add a new contact as a data source.

Apple Address Book Programming Guide provides one ABNewPersonViewController to add a new contact. Is there a way to add this to the entire contact collector as a navigation tree? Does anyone see similar code examples in the list of Apple examples (too much to learn)?

Another related problem is that when the people selection controller is displayed, it appears with animation from bottom to top. Is there a way to control my animation on the left, similar to the trigger animation?

+4
source share
2 answers

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

+1
source

To do what you are trying to do, you need to create your own controller that populates the table cells using the AB API. You can click the controller on your existing navigation controller to get the animation you want, and use ABNewPersonViewController to add new entries.

0
source

Source: https://habr.com/ru/post/1316055/


All Articles