如何存储用户数据iOS [英] How to store user data iOS
问题描述
我需要存储用户可以添加的数据,他们可以添加无限量。它们可以是 NSStrings
或 UIImage
。我查看了NSUserDefaults,但它似乎用于少量数据,如设置或首选项。
I need to store data that the user can add, they can add an unlimited amount. They can either be NSStrings
or UIImage
s. I have looked into NSUserDefaults but it seems that it is used for small amounts of data such as settings or preferences.
什么是最好/最安全的存储方式用户信息,以便当他们关闭应用程序时,它仍然在应用程序中。数据填充 UITableView
,并且是 NSMutableArray
。
What would be the best/most secure way to store the users information so that when they close the app it is still in the app. The data populates a UITableView
and is a NSMutableArray
.
最好的方法是什么?
推荐答案
您应该使用核心数据。有一个非常好的,免费的初学者课程在线avaibable称为cs193p,见这里 http://www.stanford.edu/class/cs193p/cgi-bin/drupal/node/287 ,它也可以通过iTunes U获得。值得花时间观看并且易于理解。
You should use Core Data. There is a very good, free beginners course online avaibable called cs193p, see here http://www.stanford.edu/class/cs193p/cgi-bin/drupal/node/287, it is also available through iTunes U. It's really worth the time to watch and easy understandable.
这篇关于如何存储用户数据iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!