I am using two view controller. I know that when we move to second view controller, the back button title in the Second View Controller will display the First View Controller Title. Now My first View Controller title is Registration, But when I move to the Second View Controller the back should be displayed as “Home“. I tried using the following code, but it doesn’t change.
self.navigationController.navigationBar.backItem.title = @"Home";
Even in the SecondViewController I created my own custom BarbuttonItem like this
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Home" style:UIBarButtonItemStyleBordered target:nil action:nil];
self.navigationItem.backBarButtonItem = backButton;
But the button looks like a rectangle shape.
Can anyone tell me how to change the Leftbutton item title. ??
Before you push the new ViewController: