I have a situation that one window present modal view controller and then user can tap to open new modal controller and it can go on. Each model controller have a button to dismiss and requirement is that it should come back to the first view controller which was presenting them.
For eg A presents B present C presents D. Now when user will press dismiss in D then it should come to A.
What is happening if I do this all view controller dismisses but Modal session stays there i.e app become unresponsive as if model window is still there.