Compartir a través de


MPMusicPlayerControllerQueue.DidChangeNotification Propiedad

Definición

Constante de notificación para DidChange

[Foundation.Advice("Use MPMusicPlayerControllerQueue.Notifications.ObserveDidChange helper method instead.")]
[Foundation.Field("MPMusicPlayerControllerQueueDidChangeNotification", "MediaPlayer")]
public static Foundation.NSString DidChangeNotification { get; }
member this.DidChangeNotification : Foundation.NSString

Valor de propiedad

La constante NSString debe usarse como token para NSNotificationCenter.

Atributos

Comentarios

Esta constante se puede usar con NSNotificationCenter para registrar un agente de escucha para esta notificación, además, los desarrolladores pueden usar la notificación ObserveDidChange fuertemente tipada en su lugar. Se trata de un NSString en lugar de una cadena, ya que estos valores se pueden usar como tokens en algunas bibliotecas nativas en lugar de usarse exclusivamente para su contenido de cadena real. El parámetro "notification" de la devolución de llamada contiene información adicional específica del tipo de notificación.

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


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

void Setup ()
{
    NSNotificationCenter.DefaultCenter.AddObserver (MPMusicPlayerControllerQueue.DidChangeNotification, Callback);
}

Se aplica a