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
Post a Comment