Cristi Băluță
Cristi Băluță

Reputation: 1305

Reactivate my app from the status bar icon

I'm building a Mac app that has no dock icon, but a status bar icon, so the only way of bringing it is from the status icon.

When the app is active i can bring my NSWindow on screen from the status icon without problems. The problem appears when the app looses focus, at that point the app hides itself. I don't know how to make the app again active when i click the status icon.

Thanks.

Upvotes: 0

Views: 193

Answers (1)

zpasternack
zpasternack

Reputation: 17898

Have you tried NSApplication's activateIgnoringOtherApps:?

[NSApp activateIgnoringOtherApps:YES];

Upvotes: 1

Related Questions