I Have a DetailViewController that is pushed from MasterViewController as in figure below:
When the detail view shows up it has a "back" button title is equal to the file name of the MasterViewController: "Master" (because I have a custom title with two labels in MasterViewController).
Is there a way to modify it?
MasterViewController compound title:
UIView *titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 150, sum + 20)];
[titleView addSubview:first];
[titleView addSubview:second];
self.navigationController.navigationBar.topItem.titleView = titleView;
I have tried with no luck:
self.navigationController.navigationBar.backItem.title = @"AAA";
self.navigationController.navigationItem.backBarButtonItem.title = @"AAA";
self.navigationItem.backBarButtonItem.title = @"AAA";
I have noticed that in the view hierarchy there is no NavigationItem
or NavigationBar
in DetailViewController, and thus adding it there is no possibility to add the left arrow to the BarButtonItem
There is also another question similar to this but with no clear answers.
What is showing is the title property of the view controller so in MasterViewController set