次の方法で共有


AVAssetTrack.Notifications.ObserveTrackAssociationsDidChange メソッド

定義

オーバーロード

ObserveTrackAssociationsDidChange(EventHandler<NSNotificationEventArgs>)

定数の厳密に型指定された通知 TrackAssociationsDidChangeNotification

ObserveTrackAssociationsDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

定数の厳密に型指定された通知 TrackAssociationsDidChangeNotification

ObserveTrackAssociationsDidChange(EventHandler<NSNotificationEventArgs>)

定数の厳密に型指定された通知 TrackAssociationsDidChangeNotification

public static Foundation.NSObject ObserveTrackAssociationsDidChange (EventHandler<Foundation.NSNotificationEventArgs> handler);
static member ObserveTrackAssociationsDidChange : EventHandler<Foundation.NSNotificationEventArgs> -> Foundation.NSObject

パラメーター

handler
EventHandler<NSNotificationEventArgs>

通知が発生したときに応答するハンドラー。

戻り値

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

注釈

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

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

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

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

適用対象

ObserveTrackAssociationsDidChange(NSObject, EventHandler<NSNotificationEventArgs>)

定数の厳密に型指定された通知 TrackAssociationsDidChangeNotification

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

パラメーター

objectToObserve
NSObject

観察する特定のオブジェクト。

handler
EventHandler<NSNotificationEventArgs>

通知が発生したときに応答するハンドラー。

戻り値

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

注釈

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

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

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

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

適用対象