1

in my app say i have 2 pages on click on next button(using push view controller) in page 1 it ill navigate to 2nd page , in the 2nd page i have a download(UIButton , not in the navigation bar) button , on click of that i need to hide the back button back

if back button is created by us we can hide it by using the following code

self.navigationItem.leftBarButtonItem = nil;

but i am not getting how to hide that back button,,can any one help me, thanx in advance

EmptyStack
  • 51,274
  • 23
  • 147
  • 178
Ravi
  • 1,759
  • 5
  • 20
  • 38

2 Answers2

4

You can hide the back button using the following code:

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

See this answer for more details: How to hide the "back" button in UINavigationController?

Community
  • 1
  • 1
Kristofer Sommestad
  • 3,061
  • 27
  • 39
0

You can do...

self.navigationItem.hidesBackButton = YES;

mjisrawi
  • 7,846
  • 3
  • 24
  • 27