可能會改變一個菜單欄應用程序標題字體大小的簡單方法存在,使得@「標題」顯示比默認小(或更大)更改菜單欄應用程序的字體大小
statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain];
[statusItem setHighlightMode:YES];
[statusItem setTitle:@"title"];
[statusItem setMenu:statusMenu];
大多數原因的使用這種代碼,收到錯誤和警告消息,此錯誤消息顯示「以前的預期表達式@'標記,並且此警告消息顯示」'NSMutableAttributedString'可能不會響應'-setAttributes:'。有機會我刪除這個「[attrStr setAttributes:」部分,這個代碼似乎工作 – coltcdc