Partager via


UIView.Notifications.ObserveAnnouncementDidFinish Méthode

Définition

Surcharges

ObserveAnnouncementDidFinish(EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

Notification fortement typée pour la AnnouncementDidFinishNotification constante.

ObserveAnnouncementDidFinish(NSObject, EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

Notification fortement typée pour la AnnouncementDidFinishNotification constante.

ObserveAnnouncementDidFinish(EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

Notification fortement typée pour la AnnouncementDidFinishNotification constante.

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

Paramètres

handler
EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>

Méthode à appeler lorsque la notification est publiée.

Retours

Objet jeton qui peut être utilisé pour arrêter de recevoir des notifications en le supprimant ou en le transmettant à RemoveObservers(IEnumerable<NSObject>)

Remarques

Cette méthode peut être utilisée pour AnnouncementDidFinishNotification s’abonner aux notifications.

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

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

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

S’applique à

ObserveAnnouncementDidFinish(NSObject, EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

Notification fortement typée pour 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

Paramètres

objectToObserve
NSObject

Objet à observer.

handler
EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>

Méthode à appeler lorsque la notification est publiée.

Retours

Objet jeton qui peut être utilisé pour arrêter de recevoir des notifications en le supprimant ou en le transmettant à RemoveObservers(IEnumerable<NSObject>)

Remarques

Cette méthode peut être utilisée pour AnnouncementDidFinishNotification s’abonner aux notifications.

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

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

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

S’applique à