ventana una restaurar puedo minimizar maximizar los funcion cerrar botones boton aparecen cocoa button notifications nsusernotification nsusernotificationcenter

cocoa - una - Detectar el botón de cerrar haga clic en NSUserNotification



no me aparecen los botones de cerrar minimizar y maximizar (0)

Estoy mostrando una NSUserNotification local en OS X con el siguiente código:

NSUserNotification *notification = [[NSUserNotification alloc] init]; [notification setTitle:@"Some Title"]; [notification setHasActionButton:YES]; [notification setActionButtonTitle:@"Snooze"]; NSUserNotificationCenter *center = [NSUserNotificationCenter defaultUserNotificationCenter]; [center setDelegate:self]; [center scheduleNotification:notification];

El problema al que me enfrento es que solo recibo un mensaje si se hace clic en la notificación en sí o en el "botón de acción", pero también deseo ejecutar algún código si se hace clic en el botón "otro" (botón de cerrar). ¿Hay alguna manera de recibir una notificación si se descarta una NSUserNotification o cuando se hace clic en el botón de cerrar? UserNotificationCenter de userNotificationCenter:didActivateNotification: no se activa cuando se hace clic en el botón de cerrar.

Si eso es imposible, ¿hay alguna manera de crear un botón desplegable como Apple usa en su aplicación Recordatorio (en este caso, se abre un menú si el usuario tiene el botón de acción).

¡Gracias!