Search code examples
iphoneuinavigationcontrolleruinavigationbarback-button

IPhone Dev: setHidesBackButton hides the button but leave it working..!


I don´t know if it was supposing to happen, but when I set:

[self.navigationItem setHidesBackButton:YES animated:NO];

or

self.navigationItem.hidesBackButton=YES;

it works, the button is hidden... BUT if I press the area where the button was supposed to be, the "invisible" button works..! This is correct..?

If I really want a invisible and not operable button I will need to set a empty button at leftBarButton..???

Thanks...


Solution

  • As far as I know thats correct behavior. I've had that happen every time I've hidden the back button.

    Try using.

    self.navigationItem.leftBarButtomItem = nil;