开发者

ABPeoplePicker select and return SELECTED phone number

Under

  • (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)

peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person开发者_StackOverflow中文版

property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier{}

is it possible to get returned the phone number or somewhat the user has clicked?


 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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜