Frage

I have my NSUserNotification showing up to document when something within my app happens. Is there any way to show the notification even when the app is the frontmost app (i.e., always show it)?

(it does show up if I'm in some other app)

War es hilfreich?

Lösung

Here's an answer with the info you need.

Notifications will only be displayed when your application isn't the key application. If you want your notifications to display regardless of if your application is key or not, you'll need to specify a delegate for NSUserNotificationCenter and override the delegate method userNotificationCenter:shouldPresentNotification: so that it returns YES.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top