Compartir a través de


UIImage.Notifications.ObserveAssistiveTouchStatusDidChange Método

Definición

Sobrecargas

ObserveAssistiveTouchStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la AssistiveTouchStatusDidChangeNotification constante.

ObserveAssistiveTouchStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la AssistiveTouchStatusDidChangeNotification constante.

ObserveAssistiveTouchStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la AssistiveTouchStatusDidChangeNotification constante.

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

Parámetros

handler
EventHandler<NSNotificationEventArgs>

Método para invocar cuando se publica la notificación.

Devoluciones

Objeto de token que se puede usar para dejar de recibir notificaciones al eliminarlo o pasarlo a RemoveObservers(IEnumerable<NSObject>)

Comentarios

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

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

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

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

Se aplica a

ObserveAssistiveTouchStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la AssistiveTouchStatusDidChangeNotification constante.

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

Parámetros

objectToObserve
NSObject

Objeto que se va a observar.

handler
EventHandler<NSNotificationEventArgs>

Método para invocar cuando se publica la notificación.

Devoluciones

Objeto de token que se puede usar para dejar de recibir notificaciones al eliminarlo o pasarlo a RemoveObservers(IEnumerable<NSObject>)

Comentarios

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

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

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

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

Se aplica a