Compartir a través de


UIImage.Notifications.ObserveSpeakScreenStatusDidChange Método

Definición

Sobrecargas

ObserveSpeakScreenStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la SpeakScreenStatusDidChangeNotification constante.

ObserveSpeakScreenStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la SpeakScreenStatusDidChangeNotification constante.

ObserveSpeakScreenStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la SpeakScreenStatusDidChangeNotification constante.

public static Foundation.NSObject ObserveSpeakScreenStatusDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveSpeakScreenStatusDidChange : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject

Parámetros

handler
EventHandler<NSNotificationEventArgs>

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 SpeakScreenStatusDidChangeNotification a las notificaciones.

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

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

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

Se aplica a

ObserveSpeakScreenStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la SpeakScreenStatusDidChangeNotification constante.

public static Foundation.NSObject ObserveSpeakScreenStatusDidChange (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveSpeakScreenStatusDidChange : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject

Parámetros

objectToObserve
NSObject

Objeto que se va a observar.

handler
EventHandler<NSNotificationEventArgs>

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 SpeakScreenStatusDidChangeNotification a las notificaciones.

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

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

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

Se aplica a