views:

173

answers:

0

I've got an iPad app that displays information about the contact in a ABPersonViewController displayed within an UINavigationController, within a popover. When the user hits the Edit button and edits the values, then presses Done, I'd like to update my UI if there are any changes that might affect it.

I've tried implementing ABAddressBookRegisterExternalChangeCallback(addressBook, editPersonCallback, self); with this callback:

void *editPersonCallback (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
  NSLog(@"editPersonCallback");
}

... but the callback never gets called.

Is there any way to detect when someone has pressed that Done button on the ABPersonViewController when editing?

Worst case I can update when the popover is dismissed, or use an NSTimer to poll occasionally when the popover is up, but those both seem a little bit like hacks, and I'd prefer something more elegant if it's possible.

Thanks!