I am looking for a way to undo all current modality changes.
I need to push a new view controller at any time in the life cycle of my application, so I cannot rely on the viewDidAppear delegate to start the presentation of this new view.
When one modal transition is already happening, and I try to click (with animation) a new controller, I get a "Terminating application due to a crash uncached exception NSInternalInconsistencyException', reason: 'Attempting to begin a modal transition from to while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed .
My only alternatives are to click on the new controller without animation or find a way to cancel all pending modal transitions.
Any help?
source share