Freigeben über


UIView.AnnouncementDidFinishNotification Eigenschaft

Definition

Benachrichtigungskonstante für AnnouncementDidFinish

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


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

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (UIView.AnnouncementDidFinishNotification, Callback);
}

Gilt für:

Weitere Informationen