Freigeben über


UIImage.ShakeToUndoDidChangeNotification Eigenschaft

Definition

Benachrichtigungskonstante für ShakeToUndoDidChange

[Foundation.Advice("Use UIImage.Notifications.ObserveShakeToUndoDidChange helper method instead.")]
[Foundation.Field("UIAccessibilityShakeToUndoDidChangeNotification", "UIKit")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static Foundation.NSString ShakeToUndoDidChangeNotification { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.ShakeToUndoDidChangeNotification : 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 (
        UIImage.ShakeToUndoDidChangeNotification, (notification) => {Console.WriteLine ("Received the notification UIImage", notification); }


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

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (UIImage.ShakeToUndoDidChangeNotification, Callback);
}

Gilt für: