¿Configuración progtwigda de la barra de navigation?

Presento programáticamente un controller de vista, pero cuando aparece un controller de vista, falta una barra de navigation. ¿Hay alguna manera de establecer mediante progtwigción una barra de navigation en este nuevo controller de vista cuando se llama?

Aquí está mi código hasta ahora:

//LOAD CRICKET GAME if gameGAMETYPE[index] == "Cricket" && gameGAMEPLAYERS[index] == "1" { println("LOAD ONE PLAYER CRICKET") //load OnePlayerCricket.swift //replace tableData with TABLEDATA //progtwigtically present new view controller if let resultController = storyboard!.instantiateViewControllerWithIdentifier("OnePlayerCricketVC") as? OnePlayerCricket { presentViewController(resultController, animated: true, completion: nil) //programmatically present a navigation bar NEED HELP HERE!!!! thank you :) } 

Aquí está su código para iniciar el controller de navigation de firstView:

 if let resultController = storyboard!.instantiateViewControllerWithIdentifier("OnePlayerCricketVC") as? OnePlayerCricket { let navController = UINavigationController(rootViewController: resultController) // Creating a navigation controller with resultController at the root of the navigation stack. self.presentViewController(navController, animated:true, completion: nil) } 

EDITAR:

Si desea agregar un button de retroceso a esa navigation, utilice este código en la class OnePlayerCricket.swift :

 override func viewDidLoad() { super.viewDidLoad() let backButton = UIBarButtonItem(title: "Back", style: UIBarButtonItemStyle.Plain, target: self, action: "goBack") navigationItem.leftBarButtonItem = backButton } func goBack(){ dismissViewControllerAnimated(true, completion: nil) } 

Si quieres hacer todo esto desde firstView, aquí tienes tu código:

 @IBAction func btnPressed(sender: AnyObject) { if let resultController = storyboard!.instantiateViewControllerWithIdentifier("OnePlayerCricketVC") as? OnePlayerCricketVC { resultController.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Back", style: UIBarButtonItemStyle.Plain, target: self, action: "goBack") let navController = UINavigationController(rootViewController: resultController) // Creating a navigation controller with VC1 at the root of the navigation stack. self.presentViewController(navController, animated:true, completion: nil) } } func goBack(){ dismissViewControllerAnimated(true, completion: nil) }