I have three UIViewControllers
where A -> B -> C, and A -> D.
When the user is done in C I want to unwind back to A and then segue to D, but I cannot ge
Try this Code in swift 3 :-
let oldVCs = self.navigationController?.viewControllers
var newVCs = [UIViewController]()
// Add your root VC in new array of VCs
newVCs.append(oldVCs![0])
// Add your new VC just after your root VC
newVCs.append("Your New VC")
self.navigationController?.setViewControllers(newVCs, animated: true)