0

So i am trying to follow the guides and tutorials that apple gives about the ABPeoplePickerNavigationController.

So far what i have been able to do is to get the picker to show and see all the avaliable contacts using this code:

- (IBAction)showPicker:(id)sender
{
    ABPeoplePickerNavigationController *picker =
        [[ABPeoplePickerNavigationController alloc] init];
    picker.peoplePickerDelegate = self;

[self presentModalViewController:picker animated:YES];
}

And then to display the information i use the code provided by apple: https://developer.apple.com/library/ios/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Chapters/QuickStart.html

If you scroll down a bit and see Listing 1-4 Displaying a person’s information.

Im using that code but it never runs.

All i can do is get the picker working. Select a person and see its information.

What i want to do is. After a person is clicked then ONLY the number/s will show and i will be able to click it to use it in code. How can i do this?

I am using my cellphone to post this question so please be gentle :P.

Timo Cengiz
  • 3,367
  • 4
  • 23
  • 45
  • Did you add ``? – cojoj Jan 06 '15 at 15:44
  • Yes i did @cojoj , what i noticed is that when i was going to write the method for displayPerson it did not find it i had to manually write it. Is it suppsed to be one of the delagate methods? – Timo Cengiz Jan 06 '15 at 15:47
  • It is an instance method, you might need to implement it in .`m` file. Just check carefully on the tutorials. – Zigii Wong Jan 06 '15 at 15:54
  • `displayPerson:` isn't a delegate method. It's a method implemented in your controller to display this `Person` object on view. – cojoj Jan 06 '15 at 15:55
  • 1
    This thread may contain the answer for you. http://stackoverflow.com/questions/25806774/abpeoplepickernavigationcontroller-changes-with-ios8 – Burf2000 Jan 06 '15 at 16:08
  • But does that code do what i want it to do? I only want the phone number/s to show – Timo Cengiz Jan 06 '15 at 16:12

0 Answers0