-
ABPeoplePicker
I am able to bring up the picker but I have yet to figure out how to get it to display email and phone numbers for the contacts.
Here's my code
Code:
- (void) pickPerson
{
struct CGRect screenRect = [UIHardware fullScreenApplicationContentRect];
screenRect.origin.x = screenRect.origin.y = 0.0f;
ABPeoplePicker* picker = [[ABPeoplePicker alloc] initWithFrame: screenRect];
[picker setAllowsCancel: YES];
[picker setPrompt: @"Select a recipient"];
[picker setAllowsCancel: YES];
CFStringRef properties[] = { CFSTR( "kABEmailProperty" ), CFSTR( "kABPhoneProperty" ) };
CFArrayRef array = CFArrayCreate( NULL, ( const void ** )properties, 2, nil );
[picker setDisplayedProperties: array];
[m_mainView addSubview: picker];
}
I know I do not have the right values for the properties. Any suggestions on how to get email and phone number properties to show up?