From b2af63f473ffa9866f3782b93df6093ff50c0280 Mon Sep 17 00:00:00 2001 From: Tim Miller Date: Tue, 20 Feb 2024 02:41:38 +0900 Subject: [PATCH] Fix Selectors for Menus (#20699) --- src/Core/src/Platform/iOS/MauiUIApplicationDelegate.Menu.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Core/src/Platform/iOS/MauiUIApplicationDelegate.Menu.cs b/src/Core/src/Platform/iOS/MauiUIApplicationDelegate.Menu.cs index df3353f95434..588c27ea5113 100644 --- a/src/Core/src/Platform/iOS/MauiUIApplicationDelegate.Menu.cs +++ b/src/Core/src/Platform/iOS/MauiUIApplicationDelegate.Menu.cs @@ -84,7 +84,9 @@ public override bool CanPerform(Selector action, NSObject? withSender) [SupportedOSPlatform("ios13.0")] [Export(KeyboardAcceleratorExtensions.MenuItemSelectedSelector)] - static internal void MenuItemSelected(UICommand uiCommand) + #pragma warning disable CA1822 // Selectors can't be static, or else it won't be found + internal void MenuItemSelected(UICommand uiCommand) + #pragma warning restore CA1822 { uiCommand.SendClicked(); }