• 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: How do you change the Application Icon in Interface Builder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you change the Application Icon in Interface Builder?


  • Subject: Re: How do you change the Application Icon in Interface Builder?
  • From: Cyril Godefroy <email@hidden>
  • Date: Thu, 13 Jun 2002 18:03:42 +0200

This is valid for the icon you use 'in the Finder' and when you launch the app, 'in the Dock'. If you want to change the icon in the Dock while running the application (for example to tell the user there are messages, etc), you'll need a tiff file and do something like that:

displayImage = [[NSImage alloc] initWithSize:NSMakeSize(128,128)];
backgroundImage = [[NSImage alloc] initWithContentsOfFile:[[self bundle] pathForResource:@"withalpha" ofType:@"tiff"]];

[backgroundImage setScalesWhenResized:YES];
[backgroundImage setSize:NSMakeSize(128,128)]

[displayImage lockFocus];
[backgroundImage compositeToPoint:NSMakePoint(0,0) operation:NSCompositeCopy];
[string drawAtPoint:NSMakePoint(10,40) withAttributes:[NSDictionary dictionaryWithObject:[NSFont menuFontOfSize:34.0] forKey:NSFontAttributeName]];
[displayImage unlockFocus];
[NSApp setApplicationIconImage:displayImage];

Have fun!

On Thursday, June 13, 2002, at 05:12 PM, John Anderson wrote:

The icon image will typically need to be saved as a tiff so that you have transparency... then use the iconComposer application (in /Developer/Applications/) to create an .icns file for it. Then add the .icns file to your project in ProjectBuilder and set it as your application icon in the bundle settings page.

John Anderson


On Thursday, June 13, 2002, at 06:07 AM, William Lee Mapp III wrote:

Hello,

This is probably a very simple and stupid question, but I am new to Mac
development and Cocoa. I am using Interface Builder to build my
application's user interface. I see the standard application icon provided
to me by the IB but when I double click on it I can not edit it. The Info
window just pops up.

How do I change this icon to an icon I have designed, and what image type is
it?

Or is it like Windows and a proprietary bitmap format?

Your assistance will be greatly appreciated.

Thanks in advance,
Will

Cyril
http://qtkit.sourceforge.net - Contribute to QuickTime for Cocoa!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: How do you change the Application Icon in Interface Builder? (From: John Anderson <email@hidden>)

  • Prev by Date: Re: copyPath and FilePackages
  • Next by Date: How do you change the Application Icon in Interface Builder?
  • Previous by thread: Re: How do you change the Application Icon in Interface Builder?
  • Next by thread: Re: How do you change the Application Icon in Interface Builder?
  • Index(es):
    • Date
    • Thread