views:

93

answers:

1

i have class like this

DrillDownAppAppDelegate.h PictureCell.h RootViewController.h SlideShowViewController.h

DrillDownAppAppDelegate.m PictureCell.m RootViewController.m SlideShowViewController.m

i want to hide my navigation bar,in class SlideShowViewController when i tap on the screen but it doesn't work my code is

[self.navigationController setNavigationBarHidden:YES animated:YES];

A: 

Assuming RootViewController is the visible view controller on the UINavigationController stack, simply push SlideShowViewController as normal, however in SlideShowViewController, include this code:

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:animated];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear];
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}
Shaun
thank you Shaun
RAGOpoR