How To Change Back Button Title Of Navigation Bar On iOS

The key moment here is that you should change backBarButtonItem before pushing your view controller, where you expect to change back button title. Change only the title of item doesn’t work, the whole button should be replaced.

UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:LS(@"All") style:UIBarButtonItemStyleBordered target:nil action:nil];
    self.navigationItem.backBarButtonItem = backButton;
    [self.navigationController pushViewController:messageViewController animated:YES];

Leave a Reply

Your email address will not be published. Required fields are marked *