2010-04-01 68 views
-1

在繼續之前,我該如何等待聯繫人在我的地址簿中被選中?我該如何等待ABPeoplePickerNavigationController被解僱

下文的代碼我用

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

//following code 

現在,它只是執行的代碼進行...

感謝

回答

1

你實現委託方法?

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

如果是,請將「以下代碼」移動到委託方法中,以便在用戶選擇一個人後,您可以繼續前進。

+1

工作很好,謝謝 – user306804 2010-04-02 08:26:35