I have a push segue from a button to a new view and would like to change the backbutton title. Can you help me whats wrong with this code?
Here is a code snippet:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"settings"]) {
NSLog(@"prepareForSegue: %@%@", segue.identifier, segue.destinationViewController);
UIViewController *viewController = [segue destinationViewController];
viewController.navigationItem.backBarButtonItem.title = @"Back";
[segue.destinationViewController setTitle:@"WeekView"];
}
}
The setTitle does work. Thanks in advance!!