diff options
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/FormsApplicationDelegate.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.iOS/FormsApplicationDelegate.cs b/Xamarin.Forms.Platform.iOS/FormsApplicationDelegate.cs index 0aacfd06..da51718c 100644 --- a/Xamarin.Forms.Platform.iOS/FormsApplicationDelegate.cs +++ b/Xamarin.Forms.Platform.iOS/FormsApplicationDelegate.cs @@ -165,9 +165,11 @@ namespace Xamarin.Forms.Platform.iOS return; var platformRenderer = (PlatformRenderer)_window.RootViewController; - _window.RootViewController = _application.MainPage.CreateViewController(); + if (platformRenderer != null) ((IDisposable)platformRenderer.Platform).Dispose(); + + _window.RootViewController = _application.MainPage.CreateViewController(); } } }
\ No newline at end of file |