Partager via


MPMoviePlayerController.Notifications.ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange Méthode

Définition

Surcharges

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(EventHandler<NSNotificationEventArgs>)

Notification fortement typée pour la MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constante.

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notification fortement typée pour la MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constante.

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(EventHandler<NSNotificationEventArgs>)

Notification fortement typée pour la MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constante.

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

Paramètres

handler
EventHandler<NSNotificationEventArgs>

Méthode à appeler lorsque la notification est publiée.

Retours

Objet jeton qui peut être utilisé pour arrêter de recevoir des notifications en le supprimant ou en le transmettant à RemoveObservers(IEnumerable<NSObject>)

Remarques

Cette méthode peut être utilisée pour MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification s’abonner aux notifications.

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

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

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

S’applique à

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notification fortement typée pour la MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constante.

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

Paramètres

objectToObserve
NSObject

Objet à observer.

handler
EventHandler<NSNotificationEventArgs>

Méthode à appeler lorsque la notification est publiée.

Retours

Objet jeton qui peut être utilisé pour arrêter de recevoir des notifications en le supprimant ou en le transmettant à RemoveObservers(IEnumerable<NSObject>)

Remarques

Cette méthode peut être utilisée pour MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification s’abonner aux notifications.

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

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

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

S’applique à