Re: Dynamically changing an application's icon / Adding a badge
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