Condividi tramite


UIImage.Notifications.ObserveShakeToUndoDidChange Metodo

Definizione

Overload

ObserveShakeToUndoDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la ShakeToUndoDidChangeNotification costante.

ObserveShakeToUndoDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la ShakeToUndoDidChangeNotification costante.

ObserveShakeToUndoDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la ShakeToUndoDidChangeNotification costante.

public static Foundation.NSObject ObserveShakeToUndoDidChange (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveShakeToUndoDidChange : 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 ShakeToUndoDidChangeNotification le notifiche.

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

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

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

Si applica a

ObserveShakeToUndoDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la ShakeToUndoDidChangeNotification costante.

public static Foundation.NSObject ObserveShakeToUndoDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveShakeToUndoDidChange : 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 ShakeToUndoDidChangeNotification le notifiche.

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

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

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

Si applica a