diff --git a/src/CommunityToolkit.Maui.MediaElement/Views/MauiMediaElement.macios.cs b/src/CommunityToolkit.Maui.MediaElement/Views/MauiMediaElement.macios.cs index 166186a6bc..dbd225a911 100644 --- a/src/CommunityToolkit.Maui.MediaElement/Views/MauiMediaElement.macios.cs +++ b/src/CommunityToolkit.Maui.MediaElement/Views/MauiMediaElement.macios.cs @@ -84,12 +84,12 @@ static ItemsViewController GetInternalControllerForItemsView GetInternalControllerForItemsView2(ItemsViewHandler2 handler) where TItemsView : ItemsView + static ItemsViewController2 GetInternalControllerForItemsView2(ItemsViewHandler2 handler) where TItemsView : ItemsView { var nonPublicInstanceFields = typeof(ItemsViewHandler2).GetFields(BindingFlags.NonPublic | BindingFlags.Instance); var controllerProperty = nonPublicInstanceFields.Single(x => x.FieldType == typeof(ItemsViewController2)); - return (ItemsViewController)(controllerProperty.GetValue(handler) ?? throw new InvalidOperationException($"Unable to get the value for the Controller property on {handler.GetType()}")); + return (ItemsViewController2)(controllerProperty.GetValue(handler) ?? throw new InvalidOperationException($"Unable to get the value for the Controller property on {handler.GetType()}")); } } // If we don't find an ItemsView, default to the current UIViewController