0

i am pushing a View om RootView controller ,i get the navigation bar with back button which is navigate to rootviewcontoller,but i don't need this back button.i pout this code in the viewcontoller to hide the back button

self.navigationItem.hidesBackButton = YES;

so i get the hidden back button,but here is the problem,i need leftnavigationbar button to show something,when i write the above code ,the letbarbutton also hidden from the view.becz the leftbarbutton act as the back button.

My need is to block the letbarbutton to become a back button when push from the rootviewcontroller,i didn't need a navigation back to rootviewcontoller.But defenitly need leftbarbutton there for my need in the view.

How can it possible to do?.Please help me to do this.

Thanks in advance.

stackiphone
  • 1,245
  • 3
  • 19
  • 41

2 Answers2

1

try this.

self.navigationItem.backBarButtonItem = nil;

it works for me

iArezki
  • 1,273
  • 2
  • 17
  • 29
0

Why don't you just set the letbarbutton and add no action to it?

lu yuan
  • 7,207
  • 9
  • 44
  • 78