0

So, I have an ABRecordRef that I've defined all the necessary properties (name, number, address, image, etc). This RecordRef has been added to a ABUnknownPersonViewController...then pushed to the stack.

   [[self navigationController] pushViewController:(ABUnknownPersonViewController*)controller animated:YES];

On a separate thread, I've downloaded updated information. How do I (programmatically)modify the ABRecordRef of the person being displayed by the ABUnknownPersonViewController which has already been pushed to the stack?

In the docs, I don't see any getters/setters for the ViewController. Please help.

ed_is_my_name
  • 601
  • 3
  • 9
  • 24

2 Answers2

0

Have you tried using NSNotificationCentre?

You can use

- [NSNotificationCentre addObserver:selector:name:object:]

in your ABUnknownPersonViewController and

- [NSNotificationCentre postNotificationName:object:userInfo:]

where you have retrieved the data.

You can find me on Codementor if you need some guidance.

Francesco Puglisi
  • 2,140
  • 2
  • 18
  • 26
0

The way I solved this was by updating other variables in the thread, then updating the ABRecordRef on the main thread. ABRecordRef can't be updated on a separate thread.

ed_is_my_name
  • 601
  • 3
  • 9
  • 24