UIApplication.RegisterUserNotificationSettings 方法

定义

注册用户通知的首选选项。

[Foundation.Export("registerUserNotificationSettings:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'UNUserNotificationCenter.RequestAuthorization' and 'UNUserNotificationCenter.SetNotificationCategories' instead.")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void RegisterUserNotificationSettings (UIKit.UIUserNotificationSettings notificationSettings);
abstract member RegisterUserNotificationSettings : UIKit.UIUserNotificationSettings -> unit
override this.RegisterUserNotificationSettings : UIKit.UIUserNotificationSettings -> unit

参数

notificationSettings
UIUserNotificationSettings

应用要使用的通知类型。

属性

注解

如有必要,这会显示一个标准隐私对话框。 用户与其交互后,将调用 M:UIKit.UIApplicationDelegate.DidRegisterUserNotifications*

适用于