NSTextStorage.Notifications.ObserveWillProcessEditing Method

Definition

Overloads

ObserveWillProcessEditing(EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the P:UIKit.NSTextStorage.WillProcessEditingNotification constant.

ObserveWillProcessEditing(NSObject, EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the P:UIKit.NSTextStorage.WillProcessEditingNotification constant.

ObserveWillProcessEditing(EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the P:UIKit.NSTextStorage.WillProcessEditingNotification constant.

public static Foundation.NSObject ObserveWillProcessEditing (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveWillProcessEditing : 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 P:UIKit.NSTextStorage.WillProcessEditingNotification notifications.

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

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

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

Applies to

ObserveWillProcessEditing(NSObject, EventHandler<NSNotificationEventArgs>)

Strongly typed notification for the P:UIKit.NSTextStorage.WillProcessEditingNotification constant.

public static Foundation.NSObject ObserveWillProcessEditing (Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveWillProcessEditing : 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 P:UIKit.NSTextStorage.WillProcessEditingNotification notifications.

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

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

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

Applies to