Closed rayfix closed 7 years ago
The problem here is that Turbolinks only uses a single, shared web view for all screens. When the modal is loaded, it takes the web view from the main screen, and loads it in the modal. When the modal is presented with .overCurrentContext
, it doesn't fire the viewWillAppear/Disappear
methods on the presenting controller. That means that Turbolinks doesn't know the screen has changed and to issue a new visit to the presenting controller when the modal is dismissed.
There isn't really a great solution here. You can use your own delegate/notifications to call visitableDelegate?.visitableViewWillAppear(self)
and visitableDelegate?.visitableViewDidAppear(self)
manually just in this case, or use a separate Turbolinks session for the modal screens.
Hi! Sorry I don't have a good test case for this yet. I am noticing that if I try to create a custom navigation transition and use:
After the modal VisitableViewController controller is dismissed, the VisitableViewController on the top of the navigation stack is frozen. If I inspect the view hierarchy after the dismissal I see:
At this point I am dead in the water.
On the other hand. If I do not set the
modalPresentationStyle
everything works (except instead of the previous view controller, the background is totally black as expected)If I go outside of Turbolinks, I don't see any problems. I have run out of things to try. If anyone has any insights on what I might try to do restore the web view properly, I am all ears. Thanks.