iPhone游戏该如何保存
2010-05-11 16:31:00 来源:WEB开发网核心提示:too.//This caused “encodeWithCoder” to be called[NSKeyedArchiver archiveRootObject: myMap toFile:filePath];That’s all there is to it ? make your custom objects
too.
//This caused “encodeWithCoder” to be called
[NSKeyedArchiver archiveRootObject: myMap toFile:filePath];
That’s all there is to it ? make your custom objects conform to NSCoder by adding the two methods, try to save only the data that is necessary, and try to use existing initializers and methods wherever possible. Then kick it all off with unarchiveObjectWithFile or archiveRootObject.
PS ? be sure to add
[]
更多精彩
赞助商链接