Reputation: 3956
A NSStatusItem application,and set NSStatusItem's view as myView
[statusItem setView:myView];
so myView can be showed in the status bar, I can toggle a popover by clicking myView . I want to hide the popover when I click the other application, what means , how to get the event when my application is not active.
Upvotes: 0
Views: 477
Reputation: 5589
In you application delegate you just have to add the following method:
- (void)applicationWillResignActive:(NSNotification *)aNotification
It will be called immediately before your application is about to deactivated.
Upvotes: 1