Hi,
I'm having a problem with the ABUnknownPersonViewController. I want the user to be able to save or edit a contact to the address book. All is fine when "Add contact" is used. But when the user wants to add data to an existing contact I run into problems. The ABUnknownPersonViewController displays a PeoplePicker but when the user selects an existing contact it doesn't display a screen where you can edit the contact and choose which fields to add or remove etc. Shouldn't it do that? That's what the SMS and Phone applications seems to do, and that's the behavior I'm looking for. Currently it just seems to add all fields in the supplied ABRecordRef to the chosen contact.
This is the code I use to display the ABUnknownPersonViewController:
Am I doing this wrong by using a ABUnknownPersonViewController - is there another way?
Any suggestions welcome!
Regards,
Markus
I'm having a problem with the ABUnknownPersonViewController. I want the user to be able to save or edit a contact to the address book. All is fine when "Add contact" is used. But when the user wants to add data to an existing contact I run into problems. The ABUnknownPersonViewController displays a PeoplePicker but when the user selects an existing contact it doesn't display a screen where you can edit the contact and choose which fields to add or remove etc. Shouldn't it do that? That's what the SMS and Phone applications seems to do, and that's the behavior I'm looking for. Currently it just seems to add all fields in the supplied ABRecordRef to the chosen contact.
This is the code I use to display the ABUnknownPersonViewController:
Code:
ABUnknownPersonViewController *newContactView = [[ABUnknownPersonViewController alloc] init];
newContactView.unknownPersonViewDelegate = self;
newContactView.displayedPerson = person;
newContactView.allowsAddingToAddressBook = YES;
UINavigationController *newNavigationController = [[UINavigationController alloc] init];
[newNavigationController initWithRootViewController:self];
MyAppDelegate *delegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
[delegate.navigationController pushViewController:newContactView animated:YES];
[newContactView release];
[newNavigationController release];
Am I doing this wrong by using a ABUnknownPersonViewController - is there another way?
Any suggestions welcome!
Regards,
Markus