开发者

iPhone Objective C - Saving Data

I have a NSMutableArray of some instances of a custom class (it has a NSString, CGPoint, and a UILabel).

I need to save this array. I tried using writeToFile:Atomically: but that doesn't work with custom classes (I think). Is there any other simple way开发者_高级运维 to save that? And how would i load it?

Thanks everybody in advance:) Any ideas, suggestions, pointers


You can use NSCoding to help with this, but I think you'll find it tricky to deal with the semantics of saving and restoring UILabels. Would it not be possible just to store them in a nib file?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜