I need to store pre-configured values that later will be used for selections that the user may choose from a table in iOS app, probably around 5-10 of choices.
What is the best way to store these kind of data in terms of performance and efficiency?
I might think of several methods like:
- hard-coded right in the rendering method
- array
- plist file
- core data
Thanks
If it is really just about 5 to 10 data items then you may store them in an NSDictionary or Array and save that in an plist file and read from it. You can use the
dictionaryWithContentsOfFilemethod orarrayWithContentsOfFilerespectively to read from the plist and usewriteToFilefor writing.For lager amount of data you can look into core data.