0

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.

1 Answers1

1

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

Community
  • 1
  • 1
Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143