开发者

NSMutableArray and saving to a file

开发者 https://www.devze.com 2023-01-03 12:43 出处:网络
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).

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).

Now if I use NSMutableArray to hold a list of Shops, 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消