Listen to the Delete action in AddressBook ShowPersonViewController on iPhone
I am writing a dialler application and am i trying to integrate the AddressBook with it. I want to allow the user to Edit the contact directly from within my application but i want to be able to listen to those modifications,开发者_StackOverflow社区 if possible. Say for example the user click the delete button in the ShowPersonViewController and the contact is deleted. I want to inform my application that contact X has been deleted. Or some detail in contact Y have been modified. Will i be able to achieve this?
Cheers AF
It looks like you should be able to do this by calling ABAddressBookRegisterExternalChangeCallback(). This allows you to register a callback function that will be called when the AddressBook database changes.
http://developer.apple.com/library/ios/documentation/AddressBook/Reference/ABAddressBookRef_iPhoneOS/Reference/reference.html#//apple_ref/c/func/ABAddressBookRegisterExternalChangeCallback
精彩评论