@interfaceFsviewcontroller () <UINavigationControllerDelegate>@end@implementationFsviewcontroller#pragmamark-lifecycle-(void) viewdidload {[Super viewdidload]; //set the agent for the navigation controller to selfSelf.navigationcontroller.Delegate=Self ;}//going to show the controller#pragmamark-uinavigationcontrollerdelegate-(void) Navigationcontroller: (Uinavigationcontroller *) Navigationcontroller Willshowviewcontroller: (UIViewController *) Viewcontroller animated: (BOOL) Animated {//determine if the controller you want to display is your ownBOOL isself = [Viewcontroller iskindofclass:[selfclass]]; [Self.navigationcontroller setnavigationbarhidden:isself animated:yes];}
Reference: http://blog.csdn.net/ws1352864983/article/details/51932388
Reprint Please specify source:http://www.cnblogs.com/ficow/p/7141984.html
IOS gracefully hides the navigation bar Navigationbar (OBJC)