I have a small iPhone app, which uses a navigation controller to display 3 views (here fullscreen):
This worked for me in Swift 3:
class ReplaceSegue: UIStoryboardSegue { override func perform() { if let navVC = source.navigationController { navVC.pushViewController(destination, animated: true) } else { super.perform() } } }