Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
- {
- [NSApp activateIgnoringOtherApps:YES];
- statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain];
- [statusItem setAction:@selector(showPopOver:)];
- [statusItem setImage:[[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"icon" ofType:@"png"]]];
- [statusItem setHighlightMode:YES];
- }
- - (IBAction)showPopOver:(id)sender {
- popover = [[NSPopover alloc] init];
- [popover setContentViewController:popOverController];
- popover.animates = YES;
- popover.delegate = self;
- [popover showRelativeToRect:[sender bounds]
- ofView:sender
- preferredEdge:NSMaxYEdge];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement