Share via


AVAssetTrack.Notifications.ObserveSegmentsDidChange Metodo

Definizione

Overload

ObserveSegmentsDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la SegmentsDidChangeNotification costante.

ObserveSegmentsDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la SegmentsDidChangeNotification costante.

ObserveSegmentsDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la SegmentsDidChangeNotification costante.

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

Parametri

handler
EventHandler<NSNotificationEventArgs>

Gestore che risponde alla notifica quando si verifica.

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 SegmentsDidChangeNotification le notifiche.

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

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

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

Si applica a

ObserveSegmentsDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la SegmentsDidChangeNotification costante.

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

Parametri

objectToObserve
NSObject

Oggetto specifico da osservare.

handler
EventHandler<NSNotificationEventArgs>

Gestore che risponde alla notifica quando si verifica.

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 SegmentsDidChangeNotification le notifiche.

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

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

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

Si applica a