Possibly a nooby question – how is encodeWithCoder called? I need to use this to save objects in files on the iphone, I am just unsure of how it is actually called. Do I have to manually call it? If so, what do I use as input for the NScoder argument?
Possibly a nooby question – how is encodeWithCoder called? I need to use this
Share
You don’t call it yourself, you use NSKeyedArchiver instead:
Where
foois your object that conforms toNSCoding. There’s also a method to save the archived object directly to a file.