在系统的菜单栏上添加App的图标

/ 0评 / 1

效果如图所示:
b_large_fM1A_74bc000001421263
最左边的蓝色方块怎么添加咧?
很简单的几行:

  NSStatusItem *_statusItem = [[NSStatusBarsystemStatusBar]               statusItemWithLength:NSVariableStatusItemLength];

    [_statusItemsetImage:[NSImageimageNamed:@"stopplay"]];
    [_statusItemsetToolTip:@"吧啦吧啦吧啦吧啦吧啦"];
    [_statusItemsetHighlightMode:YES];

发表评论

邮箱地址不会被公开。 必填项已用*标注