I have case that I can't use navigation controller, I want to back from YellowVC to blueVC. if using navigation controller I usually use
self.navigationController?.popToRootViewController(animated: true)
but If I don't use navigation controller I find there is two way to back from blueVC to yellowVC.
so what is the best way to back to first view controller? using unwind segue or using present modally segue?
Assuming you are presenting all views, better way is to use unwind Segues.