小编Joz*_*zan的帖子

如何在objective-C/Cocoa中更改状态栏项目标题的颜色?

//Create the NSStatusBar and set its length
statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain];

[statusItem setHighlightMode:YES];
[statusItem setTitle:@"myTitle"];
[statusItem setToolTip:@"myToolTip"];
[statusItem setMenu:statusMenu];
[statusItem setEnabled:YES];
Run Code Online (Sandbox Code Playgroud)

如何将"myTitle"fe的颜色改为蓝色?像PeerGuardian这样的应用程序在其列表被禁用时将其状态栏项目标题更改为红色,所以我想这在某种程度上是可能的.

谢谢!

cocoa objective-c title statusbar

5
推荐指数
1
解决办法
1977
查看次数

标签 统计

cocoa ×1

objective-c ×1

statusbar ×1

title ×1