0

I am implementing address book Ui in my application. And I am getting some problem.

I have a record id and i want to show details of that contact form address book UI frame work.

For that I have used this code:-

        ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
        picker.peoplePickerDelegate = self;
        ABAddressBookRef addressBook = ABAddressBookCreate( ); 
        NSNumber *recordId = [NSNumber numberWithInteger:[record_str integerValue]];
        ABRecordRef person = ABAddressBookGetPersonWithRecordID(addressBook,recordId.integerValue);
        [self peoplePickerNavigationController:picker shouldContinueAfterSelectingPerson:person];
        [self presentModalViewController:picker animated:YES];
        [picker release];   
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person{
return YES;}

When I run the code then it show all contact list while I have display only given record.

How can I show the address of the person whom i choose from picker?

Thanks in advance....

ios
  • 552
  • 5
  • 22

1 Answers1

1

I have made a mistake that is I am calling ABPeoplePickerNavigationController instead of ABPersonViewController. So that it showing whole contact list instead of particular contact.

Thanks to all to visit this question.

ios
  • 552
  • 5
  • 22