Add to existing contact

I am trying to reproduce the default behavior of an iPhone to add a phone number to an existing contact. To clarify, I'm talking about the user interface, not programmatically.

My first attempt was to submit ABPeoplePickerNavigationController, and when the user selects a person, submit ABNewPersonViewControllerwith the selected person. The problem with this method is that if the user presses the cancel button, the contact is deleted from the address book.

+3
source share
1 answer

You must implement the delegate method peoplePickerNavigationControllerDidCancel:(as required), and you can save it back if you need to.

A (, ) , , ABPeoplePickerNavigationController , , , , ( - ?) . ! , Apple QuickContacts !

:

// Fetch the address book 
ABAddressBookRef addressBook = ABAddressBookCreate();
NSArray *copy = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook)

: - ABAddressBook

+3

All Articles