Here's how it should be done:
ABUnknownPersonViewController *newPersonViewController = [[ABUnknownPersonViewController alloc] init]; newPersonViewController.displayedPerson = [self personObject]; [self.navigationController pushViewController:newPersonViewController animated:YES];
and how to respond to [self personObject]
- (ABRecordRef)personObject { // Create a new Person object. ABRecordRef newRecord = ABPersonCreate(); // Setting the value to the ABPerson object. //ABRecordSetValue(newRecord, kABPersonKindOrganization, @"Business Name", nil); ABMutableMultiValueRef multiPhone = ABMultiValueCreateMutable(kABMultiStringPropertyType); ABMultiValueAddValueAndLabel(multiPhone, @"1-555-555-5555", kABPersonPhoneMainLabel, NULL); ABRecordSetValue(newRecord, kABPersonPhoneProperty, multiPhone,nil); CFRelease(multiPhone); return newRecord; }
source share