Reputation: 24325
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";
}
Upvotes: 0
Views: 180
Reputation: 318774
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".
Upvotes: 2