开发者

Where can i find a good example of archiving objects for persistence for the iphone sdk

开发者 https://www.devze.com 2022-12-24 11:34 出处:网络
I have an object t开发者_如何学Pythonhat contains about half a dozen properties. I expect to save maybe a dozen or more of these objects to my documents folder. My solution is to save the data using N

I have an object t开发者_如何学Pythonhat contains about half a dozen properties. I expect to save maybe a dozen or more of these objects to my documents folder. My solution is to save the data using NSEncoding and NSKeyed/Archiver/Unarchiver. Anyone have a better strategy or approach.


NSKeyedArchiver/Unarchiver will work fine. If each file only has a half dozen properties, you might consider whether putting the entire object list in one file would be simpler for you to load/save/keep consistent.

0

精彩评论

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