NSStatusItem change image for dark tint

后端 未结 6 1576
面向向阳花
面向向阳花 2020-12-12 16:40

With OSX 10.10 beta 3, Apple released their dark tint option. Unfortunately, it also means that pretty much all status bar icons (with the exception of Apple\'s and Path Fin

6条回答
  •  鱼传尺愫
    2020-12-12 17:06

    But just in case you do want to monitor the status changes you can. I also know there is a better way to determine lite/dark mode than what's been said above, but I can remember it right now.

    // Monitor menu/dock theme changes...
    [[NSDistributedNotificationCenter defaultCenter] addObserver: self selector: @selector(themeChange:) name:@"AppleInterfaceThemeChangedNotification" object: NULL];
    
    //
    -(void) themeChange :(NSNotification *) notification
    {
        NSLog (@"%@", notification);
    }
    

提交回复
热议问题