If 5 screen transitions and return to first, will the code as below work properly?
var now_Page: Int = 5 /// now 5 pages
for i in now_Page{
self.dismiss(animated: true, completion: nil) /// back 5 pages
}
If 5 screen transitions and return to first, will the code as below work properly?
var now_Page: Int = 5 /// now 5 pages
for i in now_Page{
self.dismiss(animated: true, completion: nil) /// back 5 pages
}
If you want to go back more than one screen, you should use an unwind segue. Set one up in the storyboard editor and then do:
performSegue(withIdentifier: "unwindSegueToVC1", sender: self)