I have a traditional navigation based app. Should I set the navigation item of the viewcontroller I’m pushing in the view controller it self (eg self.navigationItem …) Or in the view controller which is about to be popped (eg myViewController.navigationItem …)?
Also if I should put it in the view controller that’s being pushed, should I set up the navigationItem in the init method, or viewDidLoad, or somewhere else?
Usually, you don’t set the navigationItem directly at all. Instead, you set the navigationItems properties (e.g
self.navigationItem.leftBarButtonItem = ...;).The usual way is to do this in the view controller itself, in its
viewDidLoadmethod.