次の方法で共有


WKInterfaceObject.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>

通知が投稿されたときに呼び出すメソッド。

戻り値

通知を破棄するか、 に渡すことによって通知の受信を停止するために使用できる Token オブジェクト RemoveObservers(IEnumerable<NSObject>)

注釈

このメソッドは、通知を AnnouncementDidFinishNotification サブスクライブするために使用できます。

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

// Listen to all notifications posted for a single object
var token = WKInterfaceObject.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>

通知が投稿されたときに呼び出すメソッド。

戻り値

通知を破棄するか、 に渡すことによって通知の受信を停止するために使用できる Token オブジェクト RemoveObservers(IEnumerable<NSObject>)

注釈

このメソッドは、通知を AnnouncementDidFinishNotification サブスクライブするために使用できます。

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

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

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

適用対象