static func showMenuView(parentVC:UIViewController){
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let resultController = storyboard.instantiateViewController(withIdentifier: "menuViewController") as? MenuViewController;
let segue:DragDownSettingSegue = DragDownSettingSegue.init(identifier: "", source: parentVC, destination: resultController);
parentVC.prepare(for: segue, sender: nil);
segue.perform();
}
I am programmatically segueing the viewcontrollers. ViewController A to B, and then B to C, and then C to D, an then D to B. There is a button "Back" in B. So i want to go to A when i go back from B. so for this, when D to B then i want to clear all the view viewcontroller from stack instead of A and B. Issues: I can't get the list of stacked view-controllers.