WEB开发网
开发学院手机开发iPhone 开发 iPhone游戏该如何保存 阅读

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 to the list of protocols for your object in the .h file to eliminate any warnings.

上一页  1 2 3 4 5 

Tags:iPhone 游戏 如何

编辑录入:coldstar [复制链接] [打 印]
赞助商链接