I wonder if its possible to set a new root VC?
My app gets init with a uinavigation controller that has a table view to be the root VC.
Then from the table v
In order to get the code snippet from the original question to work, I had to make a change to the third line
let navigationController = self.navigationController!
I am using this code in an @IBAction in the view controller that precedes the new root view controller.
Using the original code, I was receiving an error saying that my view controller had no member called window. After looking at the documentation, I could find no property named window. I'm wondering if the original block of code above was intended to be used inside a UINavigationController file.
Here is the block in its entirety.
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle())
let todayViewController: TodaysFrequencyViewController = storyboard.instantiateViewControllerWithIdentifier("todaysFrequency") as! TodaysFrequencyViewController
let navigationController = self.navigationController!
navigationController.setViewControllers([todayViewControl ler], animated: true)