1

In my storyboard, I have setup a navigation controller points to my MainVC, and it works just fine. And now, I'm trying to add another view called "HelpVC", and I created one in the storyboard. It automatically shows the navigation bar on the top. (MainVC segues to HelpVC)

However, I did everything else in code. I had initWithView in the HelpVC which draws out the interface, BUT the navigation bar does not show up, so I can't go back to that previous view controller.

How do I make sure that the navigation bar shows up and works just like other view controllers? (segue back to the last view?)

2
  • see how pushViewController(viewController: UIViewController, animated: Bool) works Commented Jan 20, 2016 at 11:22
  • can you show your stroryboard screen shot Commented Jan 20, 2016 at 11:28

1 Answer 1

1

It is not very clear from the post, but as I understood, you may want to try:

override func viewWillAppear(_ animated: Bool){
  super.viewWillAppear(animated)
  self.navigationController?.isNavigationBarHidden = false
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.