Compartir a través de


MPMoviePlayerController.Notifications.ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange Método

Definición

Sobrecargas

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constante.

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constante.

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para la MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constante.

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

Parámetros

handler
EventHandler<NSNotificationEventArgs>

Método para invocar cuando se publica la notificación.

Devoluciones

Objeto de token que se puede usar para dejar de recibir notificaciones al eliminarlo o pasarlo a RemoveObservers(IEnumerable<NSObject>)

Comentarios

Este método se puede usar para suscribirse MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification a las notificaciones.

// 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 ();

Se aplica a

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Notificación fuertemente tipada para 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

Parámetros

objectToObserve
NSObject

Objeto que se va a observar.

handler
EventHandler<NSNotificationEventArgs>

Método para invocar cuando se publica la notificación.

Devoluciones

Objeto de token que se puede usar para dejar de recibir notificaciones al eliminarlo o pasarlo a RemoveObservers(IEnumerable<NSObject>)

Comentarios

Este método se puede usar para suscribirse MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification a las notificaciones.

// 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 ();

Se aplica a