I made 4 ViewControllers (A, B, C, D) and want to dismiss D and C to back to B from D.
I used presentingViewController?.presentingViewController?.dismiss(animated: false, completion: nil)
in D, but it didn't look dismissing simultaneously even I set animated: false
. It looked like, at first dismiss D and moved to C, and the second dismiss C and moved to B. I don't want to show C during the transition.
How can I solve it?
the flow
A -> B -> C -> D -> B (dismiss D and C)