Reputation: 57060
I have a class which contains an ABPersonViewController
child view controller. Until iOS7, I was able to pass the setDisplayedPerson:
message several times, updating or replacing the displayed information. However, with iOS7, once the viewDidLoad
fires for the ABPersonViewController
child view controller, any subsequent calls to setDisplayedPerson:
are seemingly ignored.
I could replace the child view controller with another, and even animate the transition between them, but this is very inelegant.
There is an open radar for this: rdar://14682982
Anyone seen this?
Edit: The issue has been solved with iOS8 beta 1.
Upvotes: 4
Views: 686
Reputation: 11575
I've been dealing with the same issue. My current solution is to have the ABPersonViewController
as a property (I need it in several places) with delayed instantiation, and I set it to nil before using it. In this way I always have a new one to use.
Upvotes: 0
Reputation: 119
As a temporary workaround, if ABPersonViewController
is already presented, you can get ABContactViewController
via self.navigationController.topViewController.childViewControllers.firstObject
and call reloadData:
to reload displayed person info.
Upvotes: 2