Skip to content

Commit 8501082

Browse files
Update MauiMediaElement.macios.cs
1 parent b0c8ca6 commit 8501082

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CommunityToolkit.Maui.MediaElement/Views/MauiMediaElement.macios.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ static ItemsViewController<TItemsView> GetInternalControllerForItemsView<TItemsV
8484

8585
// The Controller we need is a `protected internal` property called ItemsViewController in the ItemsViewHandler2 class: https://github.com/dotnet/maui/blob/70e8ddfd4bd494bc71aa7afb812cc09161cf0c72/src/Controls/src/Core/Handlers/Items2/ItemsViewHandler2.iOS.cs#L64
8686
// In this method, we must use reflection to get the value of its backing field
87-
static ItemsViewController<TItemsView> GetInternalControllerForItemsView2<TItemsView>(ItemsViewHandler2<TItemsView> handler) where TItemsView : ItemsView
87+
static ItemsViewController2<TItemsView> GetInternalControllerForItemsView2<TItemsView>(ItemsViewHandler2<TItemsView> handler) where TItemsView : ItemsView
8888
{
8989
var nonPublicInstanceFields = typeof(ItemsViewHandler2<TItemsView>).GetFields(BindingFlags.NonPublic | BindingFlags.Instance);
9090

9191
var controllerProperty = nonPublicInstanceFields.Single(x => x.FieldType == typeof(ItemsViewController2<TItemsView>));
92-
return (ItemsViewController<TItemsView>)(controllerProperty.GetValue(handler) ?? throw new InvalidOperationException($"Unable to get the value for the Controller property on {handler.GetType()}"));
92+
return (ItemsViewController2<TItemsView>)(controllerProperty.GetValue(handler) ?? throw new InvalidOperationException($"Unable to get the value for the Controller property on {handler.GetType()}"));
9393
}
9494
}
9595
// If we don't find an ItemsView, default to the current UIViewController

0 commit comments

Comments
 (0)