iOS >> UINavigation Item Back Button Title Doesn't Change -


i'm trying set button pushed vc set within uinavigationcontroller stack. use following code, , it's not working - still previous vc name appearing button title.

-(void)viewwillappear:(bool)animated {      [super viewwillappear:animated];      self.title = @"vc title";      uibarbuttonitem* mybackbutton = [[uibarbuttonitem alloc]                                      initwithtitle:@"back"                                      style:uibarbuttonitemstylebordered                                      target:nil                                      action:nil];      self.navigationitem.backbarbuttonitem = mybackbutton;  } 

anyone?

try setting title in parent view controller's viewdidload

uibarbuttonitem *custombaritem = [[uibarbuttonitem alloc] initwithtitle:@"back" style:uibarbuttonitemstylebordered target:self action:@selector(popview)];  self.navigationitem.leftbarbuttonitem = custombaritem; 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -