Share via


AVPlayer.AvailableHdrModesDidChangeNotification Proprietà

Definizione

Costante di notifica per 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

Valore della proprietà

La costante NSString deve essere usata come token per NSNotificationCenter.

Attributi

Commenti

Questa costante può essere usata con per NSNotificationCenter registrare un listener per questa notifica, ma anche gli sviluppatori possono usare la notifica ObserveAvailableHdrModesDidChange fortemente tipizzata. Si tratta di una stringa NSString anziché di una stringa, perché questi valori possono essere usati come token in alcune librerie native anziché essere usati esclusivamente per il relativo contenuto stringa effettivo. Il parametro 'notification' per il callback contiene informazioni aggiuntive specifiche del tipo di notifica.

// 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);
}

Si applica a