大家好,我在我的应用程序中使用ABNewPersonViewController。使用此控制器,我不想将联系人添加到iPhone通讯录中。当用户单击“保存”时,我只想从ABNewPersonViewController导入值,而不是保存iPhone的通讯录。我不如何避免将此记录添加到iPhone的addressBook。
ABNewPersonViewController
has a read/write property on it, " addressBook
", that determines to what address book newly-created contacts are added. What I would do in this situation is to create a temporary ABAddressBookRef
, create the view controller, set the view controller's addressBook property to my temporary ABAddressBookRef
, and then later get the data I need from the temporary ABAddressBookRef
and then dispose of the temporary addressBook appropriately.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.