• 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: David Remahl <email@hidden>
  • Date: Mon, 17 Mar 2003 22:15:35 +0100

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 from the data.

NSImage *theIcon = [[NSImage alloc] initWithData:icnsData];

The NSImage can then be drawn to the NSView.

/ Rgds, David
_______________________________________________
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: app inaccessible during awakeFromNib
  • Previous by thread: Display a icns resource in Cocoa?
  • Next by thread: Re: Display a icns resource in Cocoa?
  • Index(es):
    • Date
    • Thread