• 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: Display a icns resource in Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display a icns resource in Cocoa?


  • Subject: Re: Display a icns resource in Cocoa?
  • From: "Clark S. Cox III" <email@hidden>
  • Date: Mon, 17 Mar 2003 16:29:23 -0500

On Monday, Mar 17, 2003, at 15:59 US/Eastern, Colin Cornaby wrote:

I have a raw icns data resource I want to display within an NSView. What is the best way to go about this? Can an NSView natively read icns? The data for the icns resource is stored as NSData. Thanks in advance.

You can create an NSImage object from a *.icns file (or practically any other image file) like so:
NSImage *myImage = [[NSImage alloc] initWithContentsOfFile: @"path/to/file.icns"];



--
http://homepage.mac.com/clarkcox3/
email@hidden
Clark S. Cox, III
_______________________________________________
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: 
 >Display a icns resource in Cocoa? (From: Colin Cornaby <email@hidden>)

  • Prev by Date: Re: app inaccessible during awakeFromNib
  • Next by Date: Re: Java wrapping Obj-C frameworks?
  • Previous by thread: Re: Display a icns resource in Cocoa?
  • Next by thread: Help Book Problems
  • Index(es):
    • Date
    • Thread