Condividi tramite


UIImage.Notifications.ObserveInvertColorsStatusDidChange Metodo

Definizione

Overload

ObserveInvertColorsStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la InvertColorsStatusDidChangeNotification costante.

ObserveInvertColorsStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la InvertColorsStatusDidChangeNotification costante.

ObserveInvertColorsStatusDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la InvertColorsStatusDidChangeNotification costante.

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

Parametri

handler
EventHandler<NSNotificationEventArgs>

Metodo da richiamare quando viene inviata la notifica.

Restituisce

Oggetto token che può essere usato per interrompere la ricezione delle notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>)

Commenti

Questo metodo può essere usato per sottoscrivere InvertColorsStatusDidChangeNotification le notifiche.

// 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 ();

Si applica a

ObserveInvertColorsStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la InvertColorsStatusDidChangeNotification costante.

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

Parametri

objectToObserve
NSObject

Oggetto da osservare.

handler
EventHandler<NSNotificationEventArgs>

Metodo da richiamare quando viene inviata la notifica.

Restituisce

Oggetto token che può essere usato per interrompere la ricezione delle notifiche eliminandolo o passandolo a RemoveObservers(IEnumerable<NSObject>)

Commenti

Questo metodo può essere usato per sottoscrivere InvertColorsStatusDidChangeNotification le notifiche.

// 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 ();

Si applica a