Using Swift, i'm opening a second view controller like this:
let vwStartTransaction = self.storyboard!.instantiateViewControllerWithIdentifier("StartTransactionView") as TransactionViewController;
self.presentViewController(vwStartTransaction, animated: true, completion: nil);
and then, within that second view, i'm opening a third one in the same way.
let vwConfirmTransaction = self.storyboard!.instantiateViewControllerWithIdentifier("ConfirmTransactionView") as ConfirmViewController;
self.presentViewController(vwConfirmTransaction, animated: true, completion: nil);
Now, when pressing the "Confirm" button in this confirmation controller, i want to close both views so that i'm back in the initial view. Can anyone tell me what the best approach is realise this?