如何删除一个有多个联系人的iPhone联系人号码? [英] How to delete one number of iphone contact which has multiple numbers in the contact?

查看:72
本文介绍了如何删除一个有多个联系人的iPhone联系人号码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想手动删除iPhone的联系人(按号码逐个删除).谁能帮我做同样的事情.我已经完成了使用方法删除联系人的操作

I want to delete contact of iphone manually(with number by number). Can anyone help me to do the same. I have done with deleting contact using method

ABAddressBookRemoveRecord(addressBook, record, nil);

此方法使我可以删除包含其所有记录的单个联系人,但是我要手动删除意味着要删除现有联系人的单个号码(如果有多个号码).给定的图像说明了要求.

This method makes me to delete a single contact with all of its record but I want to do delete manually means want to delete single number of the existing contact if it has multiple numbers. The given image says the requirement.

推荐答案

您可以参考以下链接,这将对您有帮助...

http: //www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/

iOS-将联系人添加到联系人中?

借助这些链接,您可以知道以编程方式将联系人添加到iphone操作系统...

要解决此问题,您必须获取必须更新的现有联系人对象(ABRecordRef对象),获取包含所有数字的数字属性标签对象,从<中删除要删除的数字c1>您必须准备的数字.然后,在完成所有工作之后...使用以下代码...

To resolve this problem you have to get the existing contact object(ABRecordRef object) which you have to update ,get the number property label object which contains all the numbers,remove the number which u want to delete from the ABMutableMultiValueRef of the numbers which u have to prepare.Then after doing all the stuffs... use following code...

ABRecordSetValue(person, kABPersonPhoneProperty, multiPhone,nil);

然后使用以下代码保存通讯簿....

Then save the addressbook using following code....

ABAddressBookSave(iPhoneAddressBook, &error);

此代码是基于我的研发的,请尝试此代码才能正常工作.谢谢!

This code is on the basis of my R&D, try this it must work....Thanks!!!

这篇关于如何删除一个有多个联系人的iPhone联系人号码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆