如何向ios联系人应用程序发送新联系人? [重复]

时间:2021-03-08 15:42:44

Possible Duplicate:
How to add a contact from within an app?

可能重复:如何在应用程序中添加联系人?

In our app, we want to have an 'add contact' button, which launches the contacts app with a prepopulated new contact. Is that possible, and if so how? I'd like to avoid having to design our own 'new contact' form.

在我们的应用程序中,我们希望有一个“添加联系人”按钮,该按钮会使用预先填充的新联系人启动联系人应用程序。这有可能,如果是这样的话怎么样?我想避免设计我们自己的“新联系”表格。

2 个解决方案

#1


4  

See this Question for your answer.

请参阅此问题以获得答案。

Basically you need to use ABNewPersonViewController.

基本上你需要使用ABNewPersonViewController。

#2


4  

Instantiate a ABNewPersonViewController and present it modally. You can optionally create a ABRecordRef containing the values you want to be prepopulated and assign it to the controller's displayedPerson property.

实例化ABNewPersonViewController并以模态方式呈现它。您可以选择创建包含要预先填充的值的ABRecordRef,并将其分配给控制器的displayedPerson属性。

#1


4  

See this Question for your answer.

请参阅此问题以获得答案。

Basically you need to use ABNewPersonViewController.

基本上你需要使用ABNewPersonViewController。

#2


4  

Instantiate a ABNewPersonViewController and present it modally. You can optionally create a ABRecordRef containing the values you want to be prepopulated and assign it to the controller's displayedPerson property.

实例化ABNewPersonViewController并以模态方式呈现它。您可以选择创建包含要预先填充的值的ABRecordRef,并将其分配给控制器的displayedPerson属性。