AVAssetTrack.Notifications.ObserveTimeRangeDidChange Método

Definição

Sobrecargas

ObserveTimeRangeDidChange(EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a TimeRangeDidChangeNotification constante.

ObserveTimeRangeDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a TimeRangeDidChangeNotification constante.

ObserveTimeRangeDidChange(EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a TimeRangeDidChangeNotification constante.

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

Parâmetros

handler
EventHandler<NSNotificationEventArgs>

O manipulador que responde à notificação quando ela ocorre.

Retornos

Objeto de token que pode ser usado para parar de receber notificações descartando-o ou passando-o para RemoveObservers(IEnumerable<NSObject>)

Comentários

Esse método pode ser usado para assinar TimeRangeDidChangeNotification notificações.

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

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

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

Aplica-se a

ObserveTimeRangeDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificação fortemente tipada para a TimeRangeDidChangeNotification constante.

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

Parâmetros

objectToObserve
NSObject

O objeto específico a ser observado.

handler
EventHandler<NSNotificationEventArgs>

O manipulador que responde à notificação quando ela ocorre.

Retornos

Objeto de token que pode ser usado para parar de receber notificações descartando-o ou passando-o para RemoveObservers(IEnumerable<NSObject>)

Comentários

Esse método pode ser usado para assinar TimeRangeDidChangeNotification notificações.

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

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

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

Aplica-se a