开发者

What's the best why to do a local high scores board in my app?

I'm trying to make a local high scores board for my app, but with no suc开发者_开发问答cess till now. I searched anywhere for a local high score board code but didn't found any. What is the best why to write such a thing?

If you can please post example code.

Thanks.


A very easy way, assuming the data set is small, would be to store an NSArray in the NSUserDefaults.

If the data set is larger you could use CoreData or even just a file created with an NSKeyedArchiver.


A sorted array of structures, persistent on disk?


You may want to use this post for starting off with file handling to make your data persistent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜