So i'm following the ios tutorial here
The data for the tableview is a custom class containing just strings and dates.
Here is what it looks like
Can anyone suggest how to save this to data between launches of the app?
So i'm following the ios tutorial here
The data for the tableview is a custom class containing just strings and dates.
Here is what it looks like
Can anyone suggest how to save this to data between launches of the app?
You could use NSCoding
to store such simple data. You could probably even use NSUserDefaults
but I wouldn't recommend it. Core Data is really the way to go unless you know you'll never need anything slightly more complex.
Check out this guide on how to persist simple data using NSCoding
from www.raywenderlich.com - a really good tutorial site for people beginning iOS development.
You could use NSCoding
or NSUserDefaults
.
But for any real application that has a lot more than sample data you'll be looking at something like Core Data eventually.
From your comments I see that you think it's overkill for just a couple of fields. However, this is an ideal time to learn about and practice setting up a Core Data model and connecting it to a table view with a Fetched results controller.