편집

다음을 통해 공유


WKUserNotificationInterfaceController.DidReceiveNotification Method

Definition

Method that is called when a notification is received.

[Foundation.Export("didReceiveNotification:withCompletion:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.WatchOS, 5, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'DidReceiveNotification(UNNotification)' instead.")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 3, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void DidReceiveNotification (UserNotifications.UNNotification notification, Action<WatchKit.WKUserNotificationInterfaceType> completionHandler);
abstract member DidReceiveNotification : UserNotifications.UNNotification * Action<WatchKit.WKUserNotificationInterfaceType> -> unit
override this.DidReceiveNotification : UserNotifications.UNNotification * Action<WatchKit.WKUserNotificationInterfaceType> -> unit

Parameters

notification
UNNotification

The notification that was received.

completionHandler
Action<WKUserNotificationInterfaceType>

A handler to run when the operation completes.

Attributes

Applies to