From 1f0ac22a2025eb3ddaf7ead237d34368529cc502 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Fri, 20 May 2022 15:58:25 -0500 Subject: [PATCH] [AppKit] Add constructors for NSMenuToolbarItem classes - Fixes https://github.com/xamarin/xamarin-macios/issues/15069 --- src/appkit.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/appkit.cs b/src/appkit.cs index 51af74509529..8ff76bec4dbc 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -27831,8 +27831,15 @@ interface NSSwitch : NSAccessibilitySwitch [Mac (10,15)] [MacCatalyst (13, 0)] [BaseType (typeof (NSToolbarItem))] +#if XAMCORE_5_0 + [DisableDefaultCtor] +#endif interface NSMenuToolbarItem { + [DesignatedInitializer] + [Export ("initWithItemIdentifier:")] + NativeHandle Constructor (string itemIdentifier); + [NoMacCatalyst] [Export ("menu", ArgumentSemantic.Strong)] NSMenu Menu { get; set; } @@ -28207,8 +28214,15 @@ public enum NSFontTextStyle [Mac (10,15)] [MacCatalyst (13, 0)] [BaseType (typeof (NSToolbarItem))] +#if XAMCORE_5_0 + [DisableDefaultCtor] +#endif interface NSSharingServicePickerToolbarItem { + [DesignatedInitializer] + [Export ("initWithItemIdentifier:")] + NativeHandle Constructor (string itemIdentifier); + [NoMacCatalyst] [Wrap ("WeakDelegate")] [NullAllowed]