Upravit

Sdílet prostřednictvím


UIApplication.RegisterUserNotificationSettings Method

Definition

Registers the preferred options for user notification.

[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

Parameters

notificationSettings
UIUserNotificationSettings

Notification types that the app wants to use.

Attributes

Remarks

This displays, if necessary, a standard privacy dialog. Once the user interacts with it, the M:UIKit.UIApplicationDelegate.DidRegisterUserNotifications* is called.

Applies to