I have a class called Shop
that contains data m开发者_JAVA百科embers (NSString
, NSInteger
and NSMutableArray
that contain another class (that also has NSString
and NSInteger
).
NSMutableArray
to hold a list of Shop
s, what is the best way to save the list to a file and load it later?
Again the class Shop
contains data members that is another class; both of the classes have NSString
and NSInteger
(maybe also NSData
and NSDate
).
I heard something about archiver
??
Thanks.
Exact same as problem writing a NSMutableArray to file in cocoa
You have non-plist objects in your array and need to use NSArchiver.
精彩评论