Bagikan melalui


WKInterfaceObject.VoiceOverStatusDidChangeNotification Properti

Definisi

Konstanta pemberitahuan untuk VoiceOverStatusDidChange

[Foundation.Advice("Use WKInterfaceObject.Notifications.ObserveVoiceOverStatusDidChange helper method instead.")]
[Foundation.Field("UIAccessibilityVoiceOverStatusDidChangeNotification", "WatchKit")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static Foundation.NSString VoiceOverStatusDidChangeNotification { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.VoiceOverStatusDidChangeNotification : Foundation.NSString

Nilai Properti

Konstanta NSString, harus digunakan sebagai token ke NSNotificationCenter.

Atribut

Keterangan

Konstanta ini dapat digunakan dengan NSNotificationCenter untuk mendaftarkan pendengar untuk pemberitahuan ini, juga pengembang dapat menggunakan pemberitahuan ObserveVoiceOverStatusDidChange yang ditik dengan kuat sebagai gantinya. Ini adalah NSString alih-alih string, karena nilai-nilai ini dapat digunakan sebagai token di beberapa pustaka asli alih-alih digunakan murni untuk konten string aktualnya. Parameter 'pemberitahuan' ke panggilan balik berisi informasi tambahan yang khusus untuk jenis pemberitahuan.

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


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

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (WKInterfaceObject.VoiceOverStatusDidChangeNotification, Callback);
}

Berlaku untuk