I've noticed that if I have a UIViewController
in a UINavigationController
, something like:
let vc = UIViewController()
let nav = UINavigationController()
nav.viewControllers = [vc]
self.presentViewController(nav, animated: true, completion: nil)
Adding a button the navigation bar is as easy as: vc.navigationItem.leftBarButtonItem = ...
If however, the view controller is of type ABPersonViewController
, like this:
let person = ABPersonViewController()
person.personViewDelegate = self
person.displayedPerson = info
let nav = UINavigationController()
nav.viewControllers = [person]
self.presentViewController(nav, animated: true, completion: nil)
I can't add a button the navigation bar in the same way; person.navigationItem.leftBarButtonItem = ...
, as seems to be done here, does nothing.
Is there, then, a way to add a button to the navigation bar of an ABPersonViewController
?