• 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: Dynamically changing an application's icon / Adding a badge
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamically changing an application's icon / Adding a badge


  • Subject: Re: Dynamically changing an application's icon / Adding a badge
  • From: Todd Yandell <email@hidden>
  • Date: Sun, 23 Oct 2005 17:47:29 -0500


On Oct 22, 2005, at 11:03 PM, Chad Armstrong wrote:

Is it possible to add a badge onto my application (a la Mail, OmniWeb, Transmit, iChat, etc.) without using Carbon?

Try something like this (untested):

NSImage *icon = [NSImage imageNamed:@"NSApplicationIcon"];
[icon lockFocus];

// Draw your badge image here
[badgeImage compositeToPoint:NSZeroPoint];

[icon unlockFocus];
[NSApp setApplicationIconImage:icon];

Bye,
Todd Yandell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Dynamically changing an application's icon / Adding a badge
      • From: Ryan Britton <email@hidden>
References: 
 >Dynamically changing an application's icon / Adding a badge (From: Chad Armstrong <email@hidden>)

  • Prev by Date: Re: FSRefMakePath: error -35
  • Next by Date: Re: setTextColor crash (bug in Cocoa?)
  • Previous by thread: Re: Dynamically changing an application's icon / Adding a badge
  • Next by thread: Re: Dynamically changing an application's icon / Adding a badge
  • Index(es):
    • Date
    • Thread