UIView.Notifications.ObserveReduceMotionStatusDidChange Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Überlädt
ObserveReduceMotionStatusDidChange(EventHandler<NSNotificationEventArgs>) |
Stark typisierte Benachrichtigung für die ReduceMotionStatusDidChangeNotification Konstante. |
ObserveReduceMotionStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>) |
Stark typisierte Benachrichtigung für die ReduceMotionStatusDidChangeNotification Konstante. |
ObserveReduceMotionStatusDidChange(EventHandler<NSNotificationEventArgs>)
Stark typisierte Benachrichtigung für die ReduceMotionStatusDidChangeNotification Konstante.
public static Foundation.NSObject ObserveReduceMotionStatusDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveReduceMotionStatusDidChange : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parameter
- handler
- EventHandler<NSNotificationEventArgs>
Methode, die aufgerufen wird, wenn die Benachrichtigung bereitgestellt wird.
Gibt zurück
Tokenobjekt, das verwendet werden kann, um den Empfang von Benachrichtigungen zu beenden, indem es entweder entfernt oder an übergeben wird RemoveObservers(IEnumerable<NSObject>)
Hinweise
Diese Methode kann verwendet werden, um Benachrichtigungen zu abonnieren ReduceMotionStatusDidChangeNotification .
// Listen to all notifications posted for any object
var token = UIView.Notifications.ObserveReduceMotionStatusDidChange ((notification) => {
Console.WriteLine ("Observed ReduceMotionStatusDidChangeNotification!");
};
// Listen to all notifications posted for a single object
var token = UIView.Notifications.ObserveReduceMotionStatusDidChange (objectToObserve, (notification) => {
Console.WriteLine ($"Observed ReduceMotionStatusDidChangeNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();
Gilt für:
ObserveReduceMotionStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)
Stark typisierte Benachrichtigung für die ReduceMotionStatusDidChangeNotification Konstante.
public static Foundation.NSObject ObserveReduceMotionStatusDidChange (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveReduceMotionStatusDidChange : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
Parameter
- objectToObserve
- NSObject
Das zu beobachtende Objekt.
- handler
- EventHandler<NSNotificationEventArgs>
Methode, die aufgerufen wird, wenn die Benachrichtigung bereitgestellt wird.
Gibt zurück
Tokenobjekt, das verwendet werden kann, um den Empfang von Benachrichtigungen zu beenden, indem es entweder entfernt oder an übergeben wird RemoveObservers(IEnumerable<NSObject>)
Hinweise
Diese Methode kann verwendet werden, um Benachrichtigungen zu abonnieren ReduceMotionStatusDidChangeNotification .
// Listen to all notifications posted for any object
var token = UIView.Notifications.ObserveReduceMotionStatusDidChange ((notification) => {
Console.WriteLine ("Observed ReduceMotionStatusDidChangeNotification!");
};
// Listen to all notifications posted for a single object
var token = UIView.Notifications.ObserveReduceMotionStatusDidChange (objectToObserve, (notification) => {
Console.WriteLine ($"Observed ReduceMotionStatusDidChangeNotification for {nameof (objectToObserve)}!");
};
// Stop listening for notifications
token.Dispose ();