There is no navigation bar in Swift nowViewController

I am changing the scene in my application using:

var view2:MainTableViewController = self.storyboard.instantiateViewControllerWithIdentifier("view2") as MainTableViewController

self.presentViewController(view2, animated: true, completion: nil)

It works, but the problem is that in my first view I have a navigation bar, but when I present the second view, there is no navigationBar

+4
source share
1 answer

You can use a navigation controller if you need to handle different ViewControllers.

To add a navigation controller, you can simply use the storyboard editor.

Select ViewController - Go to Editor - Paste in - Navigation Controller.

Or:

NavigationController, , NavigationBar UIItems. ViewController. , View Controller Modal View ( )

+4

All Articles