When a user taps my button, I would like to have a control flow that resembles:
@IBAction func confirmPurchase(sender: AnyObject) {
if blue == true {
let mainTabController = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("MainTabBarController")
self.presentViewController(mainTabController, animated: true, completion: nil)
} else {
perform an unwind segue
}
}
I am looking for method to call unwind segue in code. How is this achieved?