Share via


AVAssetTrack.Notifications.ObserveTrackAssociationsDidChange Metodo

Definizione

Overload

ObserveTrackAssociationsDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la TrackAssociationsDidChangeNotification costante.

ObserveTrackAssociationsDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la TrackAssociationsDidChangeNotification costante.

ObserveTrackAssociationsDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la TrackAssociationsDidChangeNotification costante.

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

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

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

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

Si applica a

ObserveTrackAssociationsDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la TrackAssociationsDidChangeNotification costante.

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

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

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

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

Si applica a