2

我是一个新的 ios 程序员,在我的应用程序上我想访问我的联系人进行通话。你们有任何练习文档或教程吗。我看起来像在 Viber 应用程序上。当用户点击联系人时,可以打电话,对不起我的英语不好。

谢谢你。

4

1 回答 1

4

要显示联系人列表,您可以使用以下代码:

ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
[self presentViewController: picker animated:YES completion: nil];

你可以使用

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier

从联系人中选择电话号码时执行必要的操作。

如需快速入门,请查看AddressBookProgrammingGuideforiPhone

于 2013-01-03T16:20:04.913 回答