UIView.Notifications.ObserveSpeakSelectionStatusDidChange UIView.Notifications.ObserveSpeakSelectionStatusDidChange Method

Definition

Overloads

ObserveSpeakSelectionStatusDidChange(EventHandler<NSNotificationEventArgs>) ObserveSpeakSelectionStatusDidChange(EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the SpeakSelectionStatusDidChangeNotification constant.

ObserveSpeakSelectionStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>) ObserveSpeakSelectionStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the SpeakSelectionStatusDidChangeNotification constant.

ObserveSpeakSelectionStatusDidChange(EventHandler<NSNotificationEventArgs>) ObserveSpeakSelectionStatusDidChange(EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the SpeakSelectionStatusDidChangeNotification constant.

public static Foundation.NSObject ObserveSpeakSelectionStatusDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveSpeakSelectionStatusDidChange : 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 SpeakSelectionStatusDidChangeNotification notifications.


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

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

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

ObserveSpeakSelectionStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>) ObserveSpeakSelectionStatusDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the SpeakSelectionStatusDidChangeNotification constant.

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

Parameters

objectToObserve
NSObject 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 SpeakSelectionStatusDidChangeNotification notifications.


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

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

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

Applies to