I have search around the web and there´s a lot of question like this, but i cant find the answer, it seems like everyone uses navigationcontroller and i am just using uiviewcontroller i am showing a UIViewcntroller like this:
[self presentViewController:controller animated:NO completion:nil];
When i realease the controller to show a controller before i use:
[self dismissViewControllerAnimated:NO completion:nil];
What i have is A->B->C in C i need to dismiss C and B UIViewControllers, how do i achieve this?
You can try this approach :
[self.presentingViewController.presentingViewController dismissViewControllerAnimated:NO completion:nil];
From C where you want to go to views back just put this line and it will lead you directly to A.
You can also use NSNotificationCenter.
Hope this helps you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With