1
votes

I have a view controller that has a navigation bar. It is the root view controller of the navigation controller. I have another view controller that can be segued from a button on the first controller. Up to this point, everything works fine; there are navigation bars on both view controllers.

However, from the second view controller, I want to be able to segue back to the first controller. When doing this, it removes the navigation bar from both of the view controllers.

How can I get the navigation bar on both view controllers with buttons as transitions? Thanks!

2
did you try setting setNAvigationBArHidden to NO? Are you popping from second to first vc ?Teja Nandamuri

2 Answers

1
votes

Try this in storyboard:

Select the navigation controller -> Attributes Inspector -> Under Navigation controller and Bar Visibility leave the "Show navigation bar" blank

1
votes

Implement below method in your both viewcontroller,

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

}

You may hiding navigationbar somewhere.