开发者

Storing NSObjects in file

I have huge开发者_Go百科 array with NSobjects. While storing to file iPad is getting memory issues. I want to store each object in file one by one and again read it back. Any suggestions?


I would recommend Core Data. It handles all the heavy lifting in regards to memory.

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/cdProgrammingGuide.html

http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreData/CoreData.pdf


Alternatively if Core Data feels a little heavy you could implement the NSCoding protocol.

Apple provide a code example here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜