Compartilhar via


UIView.Notifications.ObserveSpeakScreenStatusDidChange Método

Definição

Sobrecargas

ObserveSpeakScreenStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a SpeakScreenStatusDidChangeNotification constante.

ObserveSpeakScreenStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a SpeakScreenStatusDidChangeNotification constante.

ObserveSpeakScreenStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a 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 a ser invocado quando a notificação é postada.

Retornos

Objeto de token que pode ser usado para parar de receber notificações descartando-o ou passando-o para RemoveObservers(IEnumerable<NSObject>)

Comentários

Esse método pode ser usado para assinar SpeakScreenStatusDidChangeNotification notificações.

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

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

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

Aplica-se a

ObserveSpeakScreenStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a 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

O objeto a ser observado.

handler
EventHandler<NSNotificationEventArgs>

Método a ser invocado quando a notificação é postada.

Retornos

Objeto de token que pode ser usado para parar de receber notificações descartando-o ou passando-o para RemoveObservers(IEnumerable<NSObject>)

Comentários

Esse método pode ser usado para assinar SpeakScreenStatusDidChangeNotification notificações.

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

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

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

Aplica-se a