Skip to content

Instantly share code, notes, and snippets.

@wolffan
Created March 26, 2013 18:09
Show Gist options
  • Save wolffan/5247718 to your computer and use it in GitHub Desktop.
Save wolffan/5247718 to your computer and use it in GitHub Desktop.
Get email From contact
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person
{
//get email and dismiss picker
ABMutableMultiValueRef email = ABRecordCopyValue( person, kABPersonEmailProperty );
CFStringRef emailRef = ABMultiValueCopyValueAtIndex(email, 0);
[self dismissModalViewControllerAnimated:YES];
//return NO to not show the contact details
return NO;
}
@wolffan
Copy link
Author

wolffan commented Mar 26, 2013

Remember to implement AdressBook protocol and to include AdressBook libraries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment