• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OS X : Different icon for Status Item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS X : Different icon for Status Item


  • Subject: Re: OS X : Different icon for Status Item
  • From: Simon Maurice <email@hidden>
  • Date: Sun, 08 Dec 2013 16:34:35 +1100

Hi Jerry,

there are two methods which are used with NSStatusItem:

- (void)setImage:
- (void)setAlternateImage:

They both do exactly what you think they would. The setImage method just sets the standard image and alternate image is when it's activated. They both take an NSImage

See the reference code: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSStatusItem_Class/Reference/Reference.html

Cheers
Simon


On 8 Dec 2013, at 3:47 pm, Jerry Krinock <email@hidden> wrote:

> How can I make my app’s Status Item (“menulet", right side of menu bar) have a different icon than its icon shown in the Dock and Finder?
>
> I cannot find any mention of this in “Status Item Programming Topics”, and tests indicate that it simply uses the same .icns resource indicated by CFBundleIconFile in Info.plist.  But I’ve seen other non-Apple apps do it, so apparently it can be done.
>
> Thanks,
>
> Jerry Krinock
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >OS X : Different icon for Status Item (From: Jerry Krinock <email@hidden>)

  • Prev by Date: DockTile sample code, Principal class is "DockTile" ?
  • Next by Date: Question about adding NSTextView into a zoomed parent view (10.9)
  • Previous by thread: Re: OS X : Different icon for Status Item
  • Next by thread: NSStatusBar removeStatusItem on Mavericks
  • Index(es):
    • Date
    • Thread