0

I am having a weird issue with a pushed view controller not taking my previous view controller title and using it as the back button title.

Playing around with it to try to get it to work I got the below code working and the other not working. The self.team.name is a little longer then back but it always defaults to "Back". Any clue why one works and the other doesnt?

Doesnt Work

-(void)viewWillDisappear:(BOOL)animated {
    self.title = self.team.name;
}

Works

-(void)viewWillDisappear:(BOOL)animated {
    self.title = @"back";
}
rmaddy
  • 307,833
  • 40
  • 508
  • 550
Mike Flynn
  • 22,737
  • 51
  • 175
  • 325

1 Answers1

2

As of iOS 7 (I mistakenly said iOS 8 in my comment), if the title of the back button would be too long, iOS automatically show the button title as "Back".

rmaddy
  • 307,833
  • 40
  • 508
  • 550