MAC系统托盘图标

 - (void)viewDidLoad {
    [super viewDidLoad];

    // Do any additional setup after loading the view.    
    CGFloat f = 30.0;
    statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:f];
    [statusItem setHighlightMode:YES];
    [statusItem setTitle:[NSString stringWithFormat:@"%@",@"Hi"]];
    [statusItem setMenu:statusMenu];
    [statusItem setEnabled:YES];
}

Comments are closed.