Share via


UIView.Notifications.ObserveAnnouncementDidFinish 메서드

정의

오버로드

ObserveAnnouncementDidFinish(EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

상수에 대한 강력한 형식의 알림입니다 AnnouncementDidFinishNotification .

ObserveAnnouncementDidFinish(NSObject, EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

상수에 대한 강력한 형식의 알림입니다 AnnouncementDidFinishNotification .

ObserveAnnouncementDidFinish(EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

상수에 대한 강력한 형식의 알림입니다 AnnouncementDidFinishNotification .

public static Foundation.NSObject ObserveAnnouncementDidFinish (EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> handler);
static member ObserveAnnouncementDidFinish : EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> -> Foundation.NSObject

매개 변수

handler
EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>

알림이 게시될 때 호출할 메서드입니다.

반환

토큰 개체를 삭제하거나 전달하여 알림 수신을 중지하는 데 사용할 수 있는 토큰 개체 RemoveObservers(IEnumerable<NSObject>)

설명

이 메서드를 사용하여 알림을 구독 AnnouncementDidFinishNotification 할 수 있습니다.

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

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

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

적용 대상

ObserveAnnouncementDidFinish(NSObject, EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>)

상수에 대한 강력한 형식의 알림입니다 AnnouncementDidFinishNotification .

public static Foundation.NSObject ObserveAnnouncementDidFinish (Foundation.NSObject objectToObserve, EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> handler);
static member ObserveAnnouncementDidFinish : Foundation.NSObject * EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> -> Foundation.NSObject

매개 변수

objectToObserve
NSObject

관찰할 개체입니다.

handler
EventHandler<UIAccessibilityAnnouncementFinishedEventArgs>

알림이 게시될 때 호출할 메서드입니다.

반환

토큰 개체를 삭제하거나 전달하여 알림 수신을 중지하는 데 사용할 수 있는 토큰 개체 RemoveObservers(IEnumerable<NSObject>)

설명

이 메서드를 사용하여 알림을 구독 AnnouncementDidFinishNotification 할 수 있습니다.

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

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

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

적용 대상