I want to have a table view that is blank at start.
The user will be able to add entries and sub entries to design a workout routine.
For example, table is blank at first, then user adds “Day 1”, and adds bench press, bicep curl, etc. into this Day 1 sub table. Then he adds a Day 2, and adds some other exercises in there.
I already have all these strings that user can choose from in a plist that is loaded into a different table that just sorts these strings my muscle group. What is the best way to go about this?
I hope my question is clear if not I will try better to reword it.
I’ve done something similar where I actually just wrote the contents of my array out to a PLIST file and steered clear of the keyed archiver. You can’t use this approach if you have custom objects in your array. I believe your array (or dictionary) contents can only be of type nsstring, nsnumber, nsdata, nsarray, nsdate and nsdictionary (there could be more?!?).
I have a singleton that controls loading and writing the data from/to local storage. It also contains the single array object that I manipulate from my various view controllers.
Within init, I load my array property (deep mutable copy is a category method I’ve built for nssarray):
when I’m ready to save my data, I simply call a persist method: