• 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
Textual representation of an NSData?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Textual representation of an NSData?


  • Subject: Textual representation of an NSData?
  • From: Dave DeLong <email@hidden>
  • Date: Mon, 01 Dec 2008 20:46:54 -0700

Hey everyone,

I've got some NSData objects that I'd like to hard code into a file (they're encoded images for some example factory methods). The reason I need to hard code them is that I need to be able to reconstruct these images on both the Mac and the iPhone, and I thought that getting the TIFFRepresentation of the 32x32 version and then some how hard coding it into my factory class would be "simplest".

If possible, I'd like to avoid compiling in image files, because in the future I'm planning on being able to accept any image encoded into an NSData (ones that won't be hard coded), and I'd like to have the built-in presets follow the same format.

I've written a little app to take the bytes of an NSData and convert them into a hexadecimal string, using the code found here: http://www.cocoabuilder.com/archive/message/cocoa/2007/11/29/194188 , but I'm at a bit of a loss on how to reconstruct the NSData from the hex string.

Any thoughts?

Thanks,

Dave
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Textual representation of an NSData?
      • From: "Stephen J. Butler" <email@hidden>
    • Re: Textual representation of an NSData?
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: best way to add transitions
  • Next by Date: Re: Textual representation of an NSData?
  • Previous by thread: Re: UIImageView drawRect not called
  • Next by thread: Re: Textual representation of an NSData?
  • Index(es):
    • Date
    • Thread