The app I'm working on consists of a hierarchy of data and a filter to search through that data. The data is displayed in a hierarchy of table views, and navigation through that hierarchy works fine. However, when I try to navigate to my filter view model (which is shown as a modal view controller), I run into problems.
The first time I open the modal view, everything works fine, and I can close it and all navigation still works. When I try to open it a second time, however, the modal view will appear and the app will freeze and crash after a couple of seconds.
Here is the code from my custom presenter (which is a subclass of MvxModalSupportTouchViewPresenter) that is handling the modal navigation request:
public override void Show (IMvxTouchView view)
{
if (view is IMvxModalTouchView) {
var newNav = new UINavigationController ();
newNav.PushViewController (view as UIViewController, false);
newNav.NavigationBar.TintColor = UIColor.Black;
PresentModalViewController (newNav, true);
return;
...
(taken from MvvmCross Using a modal ViewController from a Tab)
I close the modal by dismissing it in the view itself. Does anyone have any idea why the app is crashing?