From 9b7f6f9cdb3066b5b4b36d50b20bafb6d689ebde Mon Sep 17 00:00:00 2001 From: Jonathan CONTE <41507018+joconte@users.noreply.github.com> Date: Tue, 16 Jul 2019 21:58:34 +0200 Subject: [PATCH] [NotificationCenter] Bindings for iOS Xcode 11 beta 1 (#6579) --- src/UIKit/UIVibrancyEffect.cs | 8 ++++++++ src/notificationcenter.cs | 9 ++++++++- tests/xtro-sharpie/iOS-NotificationCenter.ignore | 1 + tests/xtro-sharpie/iOS-NotificationCenter.todo | 1 - 4 files changed, 17 insertions(+), 2 deletions(-) delete mode 100644 tests/xtro-sharpie/iOS-NotificationCenter.todo diff --git a/src/UIKit/UIVibrancyEffect.cs b/src/UIKit/UIVibrancyEffect.cs index 5e77b6206a..d858c28b94 100644 --- a/src/UIKit/UIVibrancyEffect.cs +++ b/src/UIKit/UIVibrancyEffect.cs @@ -25,16 +25,24 @@ namespace UIKit { } [iOS (10,0)] + [Deprecated (PlatformName.iOS, 13,0, message: "Use 'UIVibrancyEffect.CreateWidgetEffectForNotificationCenter' instead.")] static public UIVibrancyEffect CreatePrimaryVibrancyEffectForNotificationCenter () { return (null as UIVibrancyEffect).GetWidgetPrimaryVibrancyEffect (); } [iOS (10,0)] + [Deprecated (PlatformName.iOS, 13,0, message: "Use 'UIVibrancyEffect.CreateWidgetEffectForNotificationCenter' instead.")] static public UIVibrancyEffect CreateSecondaryVibrancyEffectForNotificationCenter () { return (null as UIVibrancyEffect).GetWidgetSecondaryVibrancyEffect (); } + + [iOS (13,0)] + static public UIVibrancyEffect CreateWidgetEffectForNotificationCenter (UIVibrancyEffectStyle vibrancyStyle) + { + return (null as UIVibrancyEffect).GetWidgetEffect (vibrancyStyle); + } #endif // IOS } } diff --git a/src/notificationcenter.cs b/src/notificationcenter.cs index ee051ee64a..a9e042b7bc 100644 --- a/src/notificationcenter.cs +++ b/src/notificationcenter.cs @@ -73,7 +73,7 @@ namespace NotificationCenter { #else [EditorBrowsable (EditorBrowsableState.Advanced)] // this is not the one we want to be seen (compat only) #endif - [Deprecated (PlatformName.iOS, 10,0)] + [Deprecated (PlatformName.iOS, 10,0, message: "Use 'UIVibrancyEffect.GetWidgetEffect' instead.")] [Static, Export ("notificationCenterVibrancyEffect")] UIVibrancyEffect NotificationCenterVibrancyEffect (); } @@ -103,14 +103,21 @@ namespace NotificationCenter { [BaseType (typeof (UIVibrancyEffect))] interface UIVibrancyEffect_NCWidgetAdditions { [iOS (10,0)] + [Deprecated (PlatformName.iOS, 13,0, message: "Use 'UIVibrancyEffect.GetWidgetEffect' instead.")] [Static] [Export ("widgetPrimaryVibrancyEffect")] UIVibrancyEffect GetWidgetPrimaryVibrancyEffect (); [iOS (10,0)] + [Deprecated (PlatformName.iOS, 13,0, message: "Use 'UIVibrancyEffect.GetWidgetEffect' instead.")] [Static] [Export ("widgetSecondaryVibrancyEffect")] UIVibrancyEffect GetWidgetSecondaryVibrancyEffect (); + + [iOS (13,0)] + [Static] + [Export ("widgetEffectForVibrancyStyle:")] + UIVibrancyEffect GetWidgetEffect (UIVibrancyEffectStyle vibrancyStyle); } #endif diff --git a/tests/xtro-sharpie/iOS-NotificationCenter.ignore b/tests/xtro-sharpie/iOS-NotificationCenter.ignore index 0157267fd9..bf28c7bdee 100644 --- a/tests/xtro-sharpie/iOS-NotificationCenter.ignore +++ b/tests/xtro-sharpie/iOS-NotificationCenter.ignore @@ -2,3 +2,4 @@ !missing-selector! +UIVibrancyEffect::notificationCenterVibrancyEffect not bound !missing-selector! +UIVibrancyEffect::widgetPrimaryVibrancyEffect not bound !missing-selector! +UIVibrancyEffect::widgetSecondaryVibrancyEffect not bound +!missing-selector! +UIVibrancyEffect::widgetEffectForVibrancyStyle: not bound diff --git a/tests/xtro-sharpie/iOS-NotificationCenter.todo b/tests/xtro-sharpie/iOS-NotificationCenter.todo deleted file mode 100644 index 8e607a89c9..0000000000 --- a/tests/xtro-sharpie/iOS-NotificationCenter.todo +++ /dev/null @@ -1 +0,0 @@ -!missing-selector! +UIVibrancyEffect::widgetEffectForVibrancyStyle: not bound