How to dismiss 2 view controllers in Swift iOS?
Below is my code.
@IBAction func backButtonTapped(sender: AnyObject) {
self.presentingViewController
.presentingViewController
.dismissViewControllerAnimated(true, completion: nil)
}
You can only dismiss one view controller at a time. Try this