ios - backBarButtonItem in navigation controller not showing up -


i started xcode project navigationviewcontroller template. , now, when push view, view comes edit button default , no bar button. have commented out editbutton code , corresponding setediting delegate method. can not button show up. doing wrong?

pushing new view:

playlistviewcontroller *playlistviewcontroller = [[playlistviewcontroller alloc] init]; playlistviewcontroller.managedobjectcontext = self.managedobjectcontext;  [self.navigationcontroller pushviewcontroller:playlistviewcontroller animated:yes]; [playlistviewcontroller release]; 

in playlistviewcontroller:

- (void)viewdidload {     [super viewdidload];      self.title = @"";      // self.navigationitem.leftbarbuttonitem = self.editbuttonitem;      // doesn't matter if here or not     self.navigationitem.hidesbackbutton = false;      uibarbuttonitem *addbutton = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemadd target:self action:@selector(insertnewobject)];     self.navigationitem.rightbarbuttonitem = addbutton;     [addbutton release]; } 

when tell uinavigationcontroller pushviewcontroller, automatically sets navigationitem.leftbarbuttonitem button title of previous uiviewcontroller's title.

if no title set, default text "back".

if title set "", no button display @ all.

self.title = @""; 

try changing text , button should match text set here.

or can manually override text of leftbarbuttonitem new uiviewcontroller.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -