Compartilhar via


UIBarItem.ShakeToUndoDidChangeNotification Propriedade

Definição

Constante de notificação para ShakeToUndoDidChange

[Foundation.Advice("Use UIBarItem.Notifications.ObserveShakeToUndoDidChange helper method instead.")]
[Foundation.Field("UIAccessibilityShakeToUndoDidChangeNotification", "UIKit")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static Foundation.NSString ShakeToUndoDidChangeNotification { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.ShakeToUndoDidChangeNotification : Foundation.NSString

Valor da propriedade

Constante NSString, deve ser usada como um token para NSNotificationCenter.

Atributos

Comentários

Essa constante pode ser usada com o NSNotificationCenter para registrar um ouvinte para essa notificação. Esse é um NSString em vez de uma cadeia de caracteres, pois esses valores podem ser usados como tokens em algumas bibliotecas nativas em vez de serem usados puramente para seu conteúdo de cadeia de caracteres real. O parâmetro 'notification' para o retorno de chamada contém informações extras específicas para o tipo de notificação.

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


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

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (UIBarItem.ShakeToUndoDidChangeNotification, Callback);
}

Aplica-se a