I have a viewcontroller
embedded in a navigationcontroller
that pushes another viewcontroller
onto the stack. This pushed viewcontroller
has an embedded viewcontroller
that segues/modally presents a final viewcontroller
.
On a button click, I am trying to dismiss the final presented viewcontroller
and pop the present-ing viewcontroller
and return to the initial state.
Thus far, I've been able to get the dismiss going, but popping does not seem to work in the completion handler of the dismiss.
I've tried printing out the hierarchy, i.e. self.presentingViewController
, self.navigationController
, self.presentingViewController.presentingViewController
..., all of which output nil, and am admittedly stuck now on returning to the initial state.
In looking at the view hierarchy, the final presented viewcontroller
is beneath a UITransitionView
separate from the rest of the stack I had mentioned earlier..
Any thoughts/guidance would be appreciated.