I want to set title to my navigation bar. I'm using
[self.navigationItem setTitle:@"Some Title"];
But, the back button title is changed not the navigation bar title.
I want to set title to my navigation bar. I'm using
[self.navigationItem setTitle:@"Some Title"];
But, the back button title is changed not the navigation bar title.
Use this by this only navigation bar's title will change not back button's title
self.navigationItem.title=@"myTitle";
UIBarButtonItem *backButton = [[UIBarButtonItem alloc]
initWithTitle:@"Back"
style:UIBarButtonItemStylePlain
target:nil
action:nil];
self.navigationItem.backBarButtonItem=backButton;
Did you implement back button like this way if not use this code
self.navigationController.navigationBar.topItem.title = @"myTitle";
or
in .h
IBOutlet UINavigationItem *navItem;
in .m
navItem.title = @"New Title";
Adding this to your current view controller:
[self setTitle:@"Your Title"]
or set it up at previous view controller:
destinationViewControl.title = @"Your Title"