Share via


AVAsset.Notifications.ObserveMediaSelectionGroupsDidChange Metodo

Definizione

Overload

ObserveMediaSelectionGroupsDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la MediaSelectionGroupsDidChangeNotification costante.

ObserveMediaSelectionGroupsDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la MediaSelectionGroupsDidChangeNotification costante.

ObserveMediaSelectionGroupsDidChange(EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la MediaSelectionGroupsDidChangeNotification costante.

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

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

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

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

Si applica a

ObserveMediaSelectionGroupsDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notifica fortemente tipizzata per la MediaSelectionGroupsDidChangeNotification costante.

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

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

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

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

Si applica a