From 87303ab1437c16241a49ff1305016543bdd52dbc Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Thu, 10 Oct 2024 12:32:11 +0100 Subject: [PATCH] [iOS] Porting fix https://github.com/dotnet/maui/pull/24830/ --- .../src/Core/Handlers/Items2/iOS/ItemsViewController2.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/ItemsViewController2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/ItemsViewController2.cs index 77a5f631876e..c885fbde96be 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/ItemsViewController2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/ItemsViewController2.cs @@ -401,14 +401,13 @@ protected virtual CGRect DetermineEmptyViewFrame() internal void UpdateView(object view, DataTemplate viewTemplate, ref UIView uiView, ref VisualElement formsElement) { // Is view set on the ItemsView? - if (view == null) + if (view == null && viewTemplate is null) { if (formsElement != null) { //Platform.GetRenderer(formsElement)?.DisposeRendererAndChildren(); } - uiView?.Dispose(); uiView = null;