-1

How can I wait for the contact to be chosen in my address book, before going on?

Hereunder the code I use

BPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
[self presentModalViewController:picker animated:YES];

//following code

Right now it just proceeds with executing the code...

Thanks

skaffman
  • 398,947
  • 96
  • 818
  • 769
user306804
  • 51
  • 3

1 Answers1

1

Are you implementing the delegate methods?

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person

If you are, move the "following code" into the delegate method, so after the user picks a person you can move on.

Pyro2927
  • 1,112
  • 9
  • 18