NSTextStorage.Notifications.ObserveWillProcessEditing 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
ObserveWillProcessEditing(EventHandler<NSNotificationEventArgs>)
P:UIKit.NSTextStorage.WillProcessEditingNotification 상수에 대한 강력한 형식의 알림입니다.
public static Foundation.NSObject ObserveWillProcessEditing(EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveWillProcessEditing : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
매개 변수
- handler
- EventHandler<NSNotificationEventArgs>
알림이 게시될 때 호출할 메서드입니다.
반환
알림을 삭제하거나 에 전달하여 알림 수신을 중지하는 데 사용할 수 있는 토큰 개체 RemoveObservers(IEnumerable<NSObject>)
설명
이 메서드는 P:UIKit.NSTextStorage.WillProcessEditingNotification 알림을 구독하는 데 사용할 수 있습니다.
// 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 ();
적용 대상
ObserveWillProcessEditing(NSObject, EventHandler<NSNotificationEventArgs>)
P:UIKit.NSTextStorage.WillProcessEditingNotification 상수에 대한 강력한 형식의 알림입니다.
public static Foundation.NSObject ObserveWillProcessEditing(Foundation.NSObject objectToObserve, EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveWillProcessEditing : Foundation.NSObject * EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject
매개 변수
- objectToObserve
- NSObject
관찰할 개체입니다.
- handler
- EventHandler<NSNotificationEventArgs>
알림이 게시될 때 호출할 메서드입니다.
반환
알림을 삭제하거나 에 전달하여 알림 수신을 중지하는 데 사용할 수 있는 토큰 개체 RemoveObservers(IEnumerable<NSObject>)
설명
이 메서드는 P:UIKit.NSTextStorage.WillProcessEditingNotification 알림을 구독하는 데 사용할 수 있습니다.
// 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 ();