Reputation:
Hi all i am using ABNewPersonViewController in my app.Using this controller i dont want to add contact to iPhone contacts book.When user clicks on save i just want to import values from the ABNewPersonViewController,not to save the addressbook of iPhone.I do no how to avoid adding this record to addressBook of iphone.
Upvotes: 0
Views: 430
Reputation: 1378
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.
Upvotes: 2