I have seen too much threads on how to go back to previous View controller, that makes sens and are easy also to implement. But in my case there is only one type of complication. Consider the following situation.
- VC1 --Opens--> VC2: vc2 is a viewcontroller that is showing a Form. On correct filling the user is taken to another VC. call it vC3
VC2 --Opens--> VC3: vc3 is a view controller that takes swipe card information and if the information provided is correct it takes to VC4
VC3 --Opens--> VC4:.
VC4 is the viewcontroller that loads up all user contacts and send information/data to that selected contact. SO far it is fine. now there is 2 conditions, if the data that I send is correctly sent then I have to go back to VC1 directly, and if the data is not sent then I have to go back to vc2 directly to take up information again.
so what are the best thing to handle this situation. Please suggest.
UPDATE:
I am using Tab bar controller, in that controller under one of that View , I am opening other VIew controller from this in series. Like from this Opening VC2 that opens VC3 and so on...
This is how I am showing my ViewController 2
let myVC2 = self.storyboard?.instantiateViewController(withIdentifier: "idMyVC2") as MyVC2
myVC2.modalPresentationStyle = .fullScreen
self.present(myVC2,animated : true)
pop...? - Andreas OetjenVC2fromVC1,VC3fromVC2and so on? - Kamran