Freigeben über


PKPassLibrary.RemotePaymentPassesDidChangeNotification Eigenschaft

Definition

Benachrichtigungskonstante für RemotePaymentPassesDidChange

[Foundation.Advice("Use PKPassLibrary.Notifications.ObserveRemotePaymentPassesDidChange helper method instead.")]
[Foundation.Field("PKPassLibraryRemotePaymentPassesDidChangeNotification", "PassKit")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static Foundation.NSString RemotePaymentPassesDidChangeNotification { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.RemotePaymentPassesDidChangeNotification : Foundation.NSString

Eigenschaftswert

Die NSString-Konstante sollte als Token für NSNotificationCenter verwendet werden.

Attribute

Hinweise

Diese Konstante kann mit dem NSNotificationCenter verwendet werden, um einen Listener für diese Benachrichtigung zu registrieren. Dies ist ein NSString anstelle einer Zeichenfolge, da diese Werte in einigen nativen Bibliotheken als Token verwendet werden können, anstatt nur für ihren tatsächlichen Zeichenfolgeninhalt verwendet zu werden. Der Parameter "notification" für den Rückruf enthält zusätzliche Informationen, die für den Benachrichtigungstyp spezifisch sind.

// Lambda style
NSNotificationCenter.DefaultCenter.AddObserver (
        PKPassLibrary.RemotePaymentPassesDidChangeNotification, (notification) => {Console.WriteLine ("Received the notification PKPassLibrary", notification); }


// Method style
void Callback (NSNotification notification)
{
    Console.WriteLine ("Received a notification PKPassLibrary", notification);
}

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (PKPassLibrary.RemotePaymentPassesDidChangeNotification, Callback);
}

Gilt für: