共用方式為


AVPlayer.AvailableHdrModesDidChangeNotification 屬性

定義

AvailableHdrModesDidChange 的通知常數

[Foundation.Advice("Use AVPlayer.Notifications.ObserveAvailableHdrModesDidChange helper method instead.")]
[Foundation.Field("AVPlayerAvailableHDRModesDidChangeNotification", "AVFoundation")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 2, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 2, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.MacOSX, ObjCRuntime.PlatformArchitecture.All, null)]
public static Foundation.NSString AvailableHdrModesDidChangeNotification { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 2, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 2, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.MacOSX, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.AvailableHdrModesDidChangeNotification : Foundation.NSString

屬性值

NSString 常數應該用來做為 NSNotificationCenter 的權杖。

屬性

備註

這個常數可以搭配 NSNotificationCenter 使用 來註冊此通知的接聽程式,而開發人員也可以改用強型別通知 ObserveAvailableHdrModesDidChange 。 這是 NSString 而非字串,因為這些值可以當做某些原生程式庫中的權杖使用,而不是單純用於其實際字串內容。 回呼的 'notification' 參數包含通知類型特有的額外資訊。

// Lambda style
NSNotificationCenter.DefaultCenter.AddObserver (
        AVPlayer.AvailableHdrModesDidChangeNotification, (notification) => {Console.WriteLine ("Received the notification AVPlayer", notification); }


// Method style
void Callback (NSNotification notification)
{
    Console.WriteLine ("Received a notification AVPlayer", notification);
}

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (AVPlayer.AvailableHdrModesDidChangeNotification, Callback);
}

適用於