Note that there are some explanatory texts on larger screens.

plurals
  1. POshow and hide navigationBar on different views
    primarykey
    data
    text
    <p>I have rootViewController with NavigationController. On the rootView navigationBar is hidden. When I pushes next view navBar is showed. So when I go back from second view to rootView navBar hides. It's okay. Then I want to go from second view to the third view and show the navBar. But it is hidden, because in second view I have this code to hide navBar in rootView when goes to it from second view:</p> <pre><code>-(void)viewWillDisappear:(BOOL)animated{ [super viewWilDisappear:animated]; [self.navigationcontroller setNavigationBarHidden:YES animated:YES]; } </code></pre> <p>How to show the navBar only on the rootView and hide it on all other views??</p> <p>Second view is subclass of UIViewController, third view is subclass of UIViewController too with UITableView created by IB.</p> <hr> <p><strong>UPD</strong></p> <p>In first viewController I've added this:</p> <pre><code>-(void)viewDidLoad{ [self.navigationController setNavigationBarHidden:YES]; [super viewDidLoad]; } -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [self.navigationController setNavigationBarHidden:YES animated:YES]; } -(void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated]; [self.navigationController setNavigationBarHidden:NO animated:YES]; } </code></pre> <p>And in THIRD this:</p> <pre><code>-(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [self.navigationController setNavigationBarHidden:NO animated:YES]; } </code></pre> <p>Thanks for help, guys!!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload