AVAsset.Notifications.ObserveDurationDidChange Método

Definición

Sobrecargas

ObserveDurationDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la DurationDidChangeNotification constante.

ObserveDurationDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la DurationDidChangeNotification constante.

ObserveDurationDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la DurationDidChangeNotification constante.

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

Parámetros

handler
EventHandler<NSNotificationEventArgs>

Controlador que responde a la notificación cuando se produce.

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 DurationDidChangeNotification a las notificaciones.

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

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

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

Se aplica a

ObserveDurationDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la DurationDidChangeNotification constante.

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

Parámetros

objectToObserve
NSObject

Objeto específico que se va a observar.

handler
EventHandler<NSNotificationEventArgs>

Controlador que responde a la notificación cuando se produce.

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 DurationDidChangeNotification a las notificaciones.

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

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

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

Se aplica a