Compartir a través de


UIImage.Notifications.ObserveInvertColorsStatusDidChange Método

Definición

Sobrecargas

ObserveInvertColorsStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la InvertColorsStatusDidChangeNotification constante.

ObserveInvertColorsStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la InvertColorsStatusDidChangeNotification constante.

ObserveInvertColorsStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la InvertColorsStatusDidChangeNotification constante.

public static Foundation.NSObject ObserveInvertColorsStatusDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveInvertColorsStatusDidChange : 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 InvertColorsStatusDidChangeNotification a las notificaciones.

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

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

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

Se aplica a

ObserveInvertColorsStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la InvertColorsStatusDidChangeNotification constante.

public static Foundation.NSObject ObserveInvertColorsStatusDidChange (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveInvertColorsStatusDidChange : 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 InvertColorsStatusDidChangeNotification a las notificaciones.

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

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

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

Se aplica a