我正在我的应用程序中实现地址簿 Ui。我遇到了一些问题。
我有一个记录 ID,我想显示该联系人表单地址簿 UI 框架的详细信息。
为此,我使用了以下代码:-
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;}
当我运行代码时,它会显示所有联系人列表,而我只显示给定的记录。
如何显示我从选择器中选择的人的地址?
提前致谢....