iphone - Back Button being created on my navigation view controller, not able to hide it -


i have navigation view controller leads controller b , controller c. controller b login screen, once user logs in, user gets taken controller c. wanted have button on controller c, take user controller (because user logged in, there no point in having button take user controller b login screen). have succeeded in doing except 1 peculiar bug cant seem fix. when transitioning controller c controller a, button gets added navigation bar on controller a! controller never had bar begin with, driving me nuts!

i have tried entering in following code in viewwillappear method:

self.navigationitem.backbarbuttonitem = nil; self.navigationitem.hidesbackbutton = yes; [self.navigationitem sethidesbackbutton:yes]; 

none of these taking away button! have no clue do, suggestions/help appreciated still noob.

don't put poptoroot in viewwilldisappear method. assume have function gets called when user done registration process in controller c. @ end of method need put [self.navigationcontroller poptorootviewcontrolleranimated:yes]

putting in viewwilldisappear , before [super viewwilldissappear] method causing problem.

edit:

try structuring viewwilldisappear method this, super call first:

- (void)viewwilldisappear:(bool)animated {     [super viewwilldisappear:animated];      [self.navigationcontroller poptorootviewcontrolleranimated:yes]; } 

edit:

well, have got kind of work. if don't need push anymore views onto after have popped controller c work. update -viewwilldisappear in controller c this:

- (void)viewwilldisappear:(bool)animated {     [super viewwilldisappear:animated];      [self.navigationcontroller setviewcontrollers:@[[self.navigationcontroller.viewcontrollers objectatindex:0]] animated:yes]; } 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -