I wrote a Master/Detail Application by using the Master/Detail template of XCode. After starting the app, the title of the navigation button for the master view is just "Master". Now I waant tio rename that button, but unfortunately I don't know how to access this button.
In appdelegate.m there is the following code to initialize the views:
MasterViewController *masterViewController = [[MasterViewController alloc] init];
UINavigationController *masterNavigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];
UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:detailViewController]
masterViewController.navigationItem.title = @"newTitle";
masterNavigationController.navigationItem.title = @"newTitle";
If you would have created Master/Detail application using Master/Detail Template, then go to your
"MasterViewController.m" file and change the string "Master" as you wanted. See the below image it would be like this in your
and also change the
barButtonItem name in the
DetailViewController.m as like below. This will do the trick.