tags:

views:

99

answers:

1

Hi every one I have built a poem application for iphone.

Now I want to create a bookmark page for my poems. I import cells list with MyCell.Plist and my poems are HTML files. Now I want to create a bookmark page for favourite poems.
How can I do that?

+2  A: 

How are your poems being displayed? In a UITableView? Where are the poems being persisted?

If your poems existed in a CoreData store you could add an extra property "isFavorite" and set it from your UI, you could then sort based on that flag.

jessecurry
yes with a UITableViw ... the poems shows on the anotherview and loaded as HTML. i don't use CoreData
Momeks
where are you pulling the poems from? Are they in a file? Loaded over the network? On a site?
jessecurry
aha .... my poems files are HTML and they imported to the project . and my UIWebview load poems directly files had imported .
Momeks
in that case I'd probably use either core data, sqlite, or just NSArchiver to store an index of the files and a flag listing if the file if favorite...Maybe you could have an Array of Dictionaries, each dictionary could have the file path, a favorite flag, and an order so they could rearrange them in the list view.
jessecurry
is there any tutorial or sample code? sorry iam new to iphone sdk
Momeks
http://stackoverflow.com/questions/1148853/loading-a-singletons-state-from-nskeyedarchiver may help out a little if you choose to use an NSKeyedArchiver (also see the Apple docs).... I would really recommend storing your data in a database though, HTML strings can be pushed into SQLite and used easily.
jessecurry