Programmatically:
let destination = UIViewController() // Your destination
navigationController?.pushViewController(destination, animated: true)
Storyboard:
First you’ll have to set an identifier for your view. In the screenshot below you can see where to enter the identifier.

After that, you can create a “destination” and push it to the navigation controller by using the code below:
let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main)
let destination = storyboard.instantiateViewController(withIdentifier: "YourViewController") as! YourViewController
navigationController?.pushViewController(destination, animated: true)
Segue:
First you’ll have to set an identifier for your segue as shown below:


performSegue(withIdentifier: "segue", sender: self)
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "segue" {
// Setup new view controller
}
}
EDIT: Updated for Swift 3.x