在
下
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)
peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)人
属性:(ABPropertyID)属性 标识符:(ABMultiValueIdentifier)标识符{}
是否可以返回电话号码或用户点击了一些?
答案 0 :(得分:2)
id value = [(id)ABRecordCopyValue(person, property) autorelease];
if (ABPersonGetTypeOfProperty(property) & kABMultiValueMask)
{
CFIndex index = ABMultiValueGetIndexForIdentifier(
(ABMultiValueRef)value, identifier);
value = [(id)ABMultiValueCopyValueAtIndex(
(ABMultiValueRef)value, index)
autorelease];
}
// show results to developer...
NSString* firstname = ( NSString*)ABRecordCopyValue(
person, kABPersonFirstNameProperty);
NSLog(@" ~~~~~~~~~~~~~~~~~~~~ firstname is %@",firstname);
NSLog(@" ~~~~~~~~~~~~~~~~~~~~ field clicked on: %@", value);