MPMoviePlayerController.Notifications.ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange Method

Definition

Overloads

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constant.

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constant.

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constant.

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

Parameters

handler
EventHandler<NSNotificationEventArgs>

Method to invoke when the notification is posted.

Returns

Token object that can be used to stop receiving notifications by either disposing it or passing it to RemoveObservers(IEnumerable<NSObject>)

Remarks

This method can be used to subscribe for MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification 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 ();

Applies to

ObserveMPMoviePlayerIsAirPlayVideoActiveDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification constant.

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

Parameters

objectToObserve
NSObject

The object to observe.

handler
EventHandler<NSNotificationEventArgs>

Method to invoke when the notification is posted.

Returns

Token object that can be used to stop receiving notifications by either disposing it or passing it to RemoveObservers(IEnumerable<NSObject>)

Remarks

This method can be used to subscribe for MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification 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 ();

Applies to