Compartir a través de


WKInterfaceObject.Notifications.ObserveAnnouncementDidFinish Método

Definición

Sobrecargas

ObserveAnnouncementDidFinish(EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

Notificación fuertemente tipada para la AnnouncementDidFinishNotification constante.

public static Foundation.NSObject ObserveAnnouncementDidFinish(EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> handler);
static member ObserveAnnouncementDidFinish : EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> -> Foundation.NSObject

Parámetros

handler
EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>

Método que se invoca cuando se publica la notificación.

Devoluciones

Objeto token que se puede usar para dejar de recibir notificaciones mediante su eliminación o su paso a RemoveObservers(IEnumerable<NSObject>)

Comentarios

Este método se puede usar para suscribirse AnnouncementDidFinishNotification a las notificaciones.

// Listen to all notifications posted for any object
var token = WKInterfaceObject.Notifications.ObserveAnnouncementDidFinish ((notification) => {
	Console.WriteLine ("Observed AnnouncementDidFinishNotification!");
};

// Listen to all notifications posted for a single object
var token = WKInterfaceObject.Notifications.ObserveAnnouncementDidFinish (objectToObserve, (notification) => {
	Console.WriteLine ($"Observed AnnouncementDidFinishNotification for {nameof (objectToObserve)}!");
};

// Stop listening for notifications
token.Dispose ();

Se aplica a

ObserveAnnouncementDidFinish(NSObject, EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

Notificación fuertemente tipada para la AnnouncementDidFinishNotification constante.

public static Foundation.NSObject ObserveAnnouncementDidFinish(Foundation.NSObject objectToObserve, EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> handler);
static member ObserveAnnouncementDidFinish : Foundation.NSObject * EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> -> Foundation.NSObject

Parámetros

objectToObserve
NSObject

Objeto que se va a observar.

handler
EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>

Método que se invoca cuando se publica la notificación.

Devoluciones

Objeto token que se puede usar para dejar de recibir notificaciones mediante su eliminación o su paso a RemoveObservers(IEnumerable<NSObject>)

Comentarios

Este método se puede usar para suscribirse AnnouncementDidFinishNotification a las notificaciones.

// Listen to all notifications posted for any object
var token = WKInterfaceObject.Notifications.ObserveAnnouncementDidFinish ((notification) => {
	Console.WriteLine ("Observed AnnouncementDidFinishNotification!");
};

// Listen to all notifications posted for a single object
var token = WKInterfaceObject.Notifications.ObserveAnnouncementDidFinish (objectToObserve, (notification) => {
	Console.WriteLine ($"Observed AnnouncementDidFinishNotification for {nameof (objectToObserve)}!");
};

// Stop listening for notifications
token.Dispose ();

Se aplica a