Prathma Rastogi
Prathma Rastogi

Reputation: 19

SearchController not showing navigation bar

Suppose, I am in discuss view controller and I searched something. Now I switched the tab and now again I get back to this discuss view controller then navigation bar got hidden which i don't want. I tried everything, like hidesNavigationBarDuringPresentation or setHidden property of navigation item, but nothing is happening.

Upvotes: 0

Views: 305

Answers (1)

Anbu.Karthik
Anbu.Karthik

Reputation: 82766

try this

if your current viewcontroller is already embed with Navigation controller, the following code will work

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

}

Note

Present viewcontroller does not embed with UINavigationcontroller, if you want we need to add in manual, see this link once

Upvotes: 1

Related Questions