w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Change the title of backbutton in NavigationBar

Set the title of the back button on the view BEFORE. So, if you segue from LoginViewController, you set the back button title on the item before you segue to LoginInfoViewController


In the viewDidLoad method on LoginViewController:

UIBarButtonItem *newBackButton = [[UIBarButtonItem alloc]
initWithTitle: @"Go back" style: UIBarButtonItemStyleBordered target: nil
action: nil];
[[self navigationItem] setBackBarButtonItem: newBackButton];

This means you're setting the button on the LoginViewController, not on the LoginInfoViewController.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.