I understand that I should set self.title
in -initWithNibName:bundle:
.
What about
self.navigationItem.titleView
?Since
self.navigationItem.titleView
seems only to be used whenself.view
is loaded, I'm thinking I should, to save memory, setself.navigationItem.titleView
in-viewDidLoad
and nil it in-viewDidUnload
, e.g.:- (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.titleView = [[UIImageView alloc] initWithImage: [UIImage imageNamed:@"logo.png"]]; } - (void)viewDidUnload { self.navigationItem.titleView = nil; [super viewDidUnload]; }
What about
self.navigationItem.backBarButtonItem
?