Freigeben über


UIBarItem.AssistiveTouchStatusDidChangeNotification Eigenschaft

Definition

Benachrichtigungskonstante für AssistiveTouchStatusDidChange

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


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

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (UIBarItem.AssistiveTouchStatusDidChangeNotification, Callback);
}

Gilt für: