'xamarin iOS app stays in background after PresentViewController dismissed

I have a Xamarin Forms app. The iOS app presents a modal view controller like so:

UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(viewController, true, null);

The current view goes into the background and the modal view is presented. When that modal view is dismissed, it goes away but the view that went in the background stays there. I'm not sure how to bring it back to the front and make it active.

FYI, the viewController in this case is a native iOS UIViewController inside a framework. When used inside a native iOS project in Xcode, the modal view dismisses properly and the old view returns to the foreground.

Any thoughts?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source