I wonder how I can remove my old VC's from the stack?
When I start my app there is a Hamburger icon/menu button in the header.
What I want to do is when a user logs into my app I want to set the VC/ Account page to be the root view so that I don't see underlying VC's when looking in the inspector.
So more or less instead of having a back button I want to add a menu button in the header on the account page.
I already tried this but I can't get it to work:
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle())
let yourViewController: ViewController = storyboard.instantiateViewControllerWithIdentifier("respectiveIdentifier") as! ViewController
let navigationController = self.window?.rootViewController as! UINavigationController
navigationController.setViewControllers([yourViewController], animated: true)