ios - Navigationbar title and back button name are same? -
i created 1 title navigationbar in storyboard project ,but when moved next viewcontroller button shows same name previous navigationbar(main navigationbar) title.? can set separate title , button names?
i tried following code not working ? why?
self.navigationitem.title=@"recent books"; self.navigationitem.backbarbuttonitem.title=@"back";
according uinavigationitem class reference
"when navigation item below top item in stack, navigation controller derives button navigation bar navigation item. [...] if want specify custom image or title button, can assign custom bar button item (with custom title or image) property instead."
so try in first vc pushing other vc
self.navigationitem.title=@"recent books"; uibarbuttonitem *backbutton = [[uibarbuttonitem alloc] initwithtitle:@"back" style:uibarbuttonitemstyleplain target:nil action:nil]; self.navigationitem.backbarbuttonitem=backbutton;
Comments
Post a Comment