Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-07-2009, 03:43 PM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 9
Question How to implement add to favorites functionality

Hi All,

I am working on tab based application that needs to have the add to favorites functionality

I want to save a mutable array of my custom class to a file as my favorite list (maximum 10 objects).

Should I use pList or create my own file?

Does iPhone Sdk have any kind of facilities for doing that?

Where can I find related information/examples in this regards?

Thanks in advance for your help

Arash from Toronto
arash is offline   Reply With Quote
Old 02-08-2009, 11:10 AM   #2 (permalink)
Physician developer
 
StatCoder's Avatar
 
Join Date: Aug 2008
Location: Austin, TX
Posts: 221
Default

Do a search on this forum for "NSUserDefaults". There are examples of code that will make it easy.
StatCoder is offline   Reply With Quote
Old 02-08-2009, 04:26 PM   #3 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 9
Default

Thanks a lot for your hint!
arash is offline   Reply With Quote
Old 04-08-2009, 05:07 PM   #4 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 109
Default

Quote:
Originally Posted by arash View Post
Hi All,

I am working on tab based application that needs to have the add to favorites functionality

I want to save a mutable array of my custom class to a file as my favorite list (maximum 10 objects).

Should I use pList or create my own file?

Does iPhone Sdk have any kind of facilities for doing that?

Where can I find related information/examples in this regards?

Thanks in advance for your help

Arash from Toronto

What did you find that worked best for the favorite functionality?
appleman is offline   Reply With Quote
Old 04-14-2009, 09:00 AM   #5 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 9
Red face

I used mySQL and saved my custom objects on a table.
Let me know if you need more info.
arash is offline   Reply With Quote
Old 04-14-2009, 08:12 PM   #6 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 109
Default

Quote:
Originally Posted by arash View Post
I used mySQL and saved my custom objects on a table.
Let me know if you need more info.
Is a SQL the only way to save things in the iPhone. If it is can you give me a link or something that would say how to create an SQL. Because I think that is where I first need to start.
appleman is offline   Reply With Quote
Old 04-15-2009, 05:34 PM   #7 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 9
Default

You can use archiver as well there is a good video for that on Vimeo website.
I used the SQLLite manager(it's a FireFox Extension) for creating the database.
I basically followed the instruction on :
http://www.iphonesdkarticles.com/200...ding-data.html

Last edited by arash; 04-15-2009 at 05:41 PM.
arash is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone development

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 251
22 members and 229 guests
14DEV, @sandris, ADY, ArtieFufkin10, bookesp, ckgni, dacapo, Dani77, DarkAn, Davey555, Desert Diva, HemiMG, iDifferent, jakerocheleau, JasonR, prchn4christ, Rudy, ryantcb, Speed, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,766
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:43 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0