问题
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
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
回答1:
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?
回答2:
You can do...
self.navigationItem.hidesBackButton = YES;
来源:https://stackoverflow.com/questions/7202698/how-to-hide-the-bar-button-item-on-click-of-a-button