I have a UIViewController
and I'm navigating from my first view controller to second view controller and I want to change the name of the button shown on the navigationcontroller
for going back ....
SecondViewController *secondController = [[SecondViewController alloc]
initWithNibName:nil
bundle:NULL];
[self.navigationController pushViewController:secondController animated:YES];
now in the second viewcontroller
I want change the name of the button in the navigationController
.
I'm on ViewController1 and going to ViewController2, If I wants to change name of back button showing on ViewController2, I will do this in ViewController2.
Swift 5
Objective-C
It is very important that in view controller "Simulated Metrics" option is not selected as "Inferred".
I tried with "None" and all it's right!
Try like this:-
In my case it only worked running the code on the Main Thread, like so:
Actually, you can change title of back button:
Swift 4
In your UIViewController, set this: