views:

229

answers:

2

I would like to add a separate tableview to my application which would provide the user with a list of their favorite books, separate from the tableview of every book in the application. They should be able to add and delete favorites from this tableview. These favorites would then be saved so that they aren't lost whenever the application closes.

The data is relatively small and retrieved from a plist file in this format where the items represent books:

>Root
-->Classical (array)
---->Item 0 (dictionary)
------>title (string)
------>description (string)
---->Item 1 (dictionary)
------>title (string)
------>description (string)
-->Romance (array)
---->Item 0 (dictionary)
------>title (string)
------>description (string)
---->Item 1 (dictionary)
------>title (string)
------>description (string)

My question is what would be the best method of accomplishing this? Since the data is quite simple would I still need to use core data, or is their a more efficient/compact way? I'm fairly new to Xcode programming and would like to avoid core data for now if possible.

I had the idea of adding a favorite boolean to each item in the plist, but since some of the descriptions can be quite long I would only want the title and favorite fields to be copied to allow for editing. Am I on the right track here? If so how would I go about doing this?

Thank you

A: 

Use a separate plist or NSUserDefaults.

Azeem.Butt
Would the proper way with NSUserDefaults be having it save a favorite boolean for each item?
Mike
You're the only one who knows what your data looks like, so you're the only one who can decide what the proper way to handle it is.
Azeem.Butt
That's why I included sample data in my original question.
Mike
A: 

Hey Mike, I'm really interested in this topic and have found little resources for it. Did you ever figure out your problem? If so, could you post a solution, or giver direction to some good resources? Thanks.

Chunjai