I know this is going to be somewhat hard to answer, but I need to save text and images into a single file (like photoshop does). Should I make a custom file type, or is there another way to do this?
If I need a custom file type, would somebody please give me link to something that may help me make the file type store the data properly? If there is another way, how can I do this?
NOTE: I am using this in a application that imports three images, and lets users put text over them, so I may not be able to get the information needed to store the images as text in any way. If it is what I have to do, I will need a link to some helpful information.
An easy way to save objects to a file is to add them to an
NSDictionaryand then useNSArchiverto archive the dictionary into data.For example in a document based app:
To read this data, just unarchive the dictionary and set the objects:
You will also need to define your custom file type in your app’s plist file.