What i want to do is this: Users press a button called "Edit an existing contact" then it opens addressbook's list of contacts. The user should choose and find the contact that they want to update, then press on it and it opens the contact detail view. In that view, I want that the user is able to edit contact information. Is there a public API to do this or it is all private?
To open address book in my application i use this code:
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
[self presentModalViewController:picker animated:YES];
I watched QuickContacts app written by Apple but here it is possible only edit a specific contact, not the choose of the user. Anyone can help me? Thanks in advance!
[edit] I solved my problem with this lines of code:
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person{
ABPersonViewController *controller = [[ABPersonViewController alloc] init];
controller.displayedPerson = person;
controller.allowsEditing = YES;
controller.personViewDelegate = self;
[peoplePicker pushViewController:controller animated:YES];
return NO;
}
Thanks very much to Matt!