UIView.Notifications.ObserveSpeakSelectionStatusDidChange Método

Definição

Sobrecargas

ObserveSpeakSelectionStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a SpeakSelectionStatusDidChangeNotification constante.

ObserveSpeakSelectionStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a SpeakSelectionStatusDidChangeNotification constante.

ObserveSpeakSelectionStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a SpeakSelectionStatusDidChangeNotification constante.

public static Foundation.NSObject ObserveSpeakSelectionStatusDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveSpeakSelectionStatusDidChange : 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 SpeakSelectionStatusDidChangeNotification notificações.

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

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

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

Aplica-se a

ObserveSpeakSelectionStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a SpeakSelectionStatusDidChangeNotification constante.

public static Foundation.NSObject ObserveSpeakSelectionStatusDidChange (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveSpeakSelectionStatusDidChange : 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 SpeakSelectionStatusDidChangeNotification notificações.

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

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

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

Aplica-se a