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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 04-18-2010, 04:53 AM   #1 (permalink)
Registered Member
 
vincefried's Avatar
 
Join Date: Apr 2010
Location: Hamburg, Germany
Posts: 38
vincefried is on a distinguished road
Default Saving content of UITableView

Hello iPhonedevsdk-community,

I have the following problem: I made an app with a UITableView. In the UITableView, you can add new rows, but when I add new rows and restart the app, the lines have disappeared. The iPhone doesn't save the content of the UITableView, when I close the app, how can I make the iPhone to do save the content and let the added lines stay?

I have also another question: I want to program, that, if I click on an add button, another view with a datepicker appears and I can set a date, that has to be the title of a new line, that has been added, when I click on an ok button. I know, how to let another view appear, and I know how to program a datepicker, but how can I let the date of the datepicker be the title of a line, that has been added, when I click on an ok button?

I hope you can help me, because I have tried to make this app for over 2 months...

Sincerely, vincefried
vincefried is offline   Reply With Quote
Old 04-19-2010, 01:08 PM   #2 (permalink)
Registered Member
 
vincefried's Avatar
 
Join Date: Apr 2010
Location: Hamburg, Germany
Posts: 38
vincefried is on a distinguished road
Default Help???

Can no one help me?
vincefried is offline   Reply With Quote
Old 04-19-2010, 03:40 PM   #3 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

When the user adds a new item, you have to be making a change to your datasource array. Save that data when you exit, load it when you launch.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 07-27-2010, 05:14 AM   #4 (permalink)
Registered Member
 
vincefried's Avatar
 
Join Date: Apr 2010
Location: Hamburg, Germany
Posts: 38
vincefried is on a distinguished road
Default Thanks, but...

Sensible Cocoa has too less possibilities for me.

@BrainSlick I thought I have to do something like this, but how?

I tried to learn a bit SQLite programming for a few days, but that's too much for me!
vincefried is offline   Reply With Quote
Old 07-27-2010, 06:19 AM   #5 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: India
Posts: 143
anurag is on a distinguished road
Default

Try using NSUserDefaults to save the datasource array... if you don't want to go for SQLite.
anurag is offline   Reply With Quote
Old 07-27-2010, 08:02 AM   #6 (permalink)
Registered Member
 
Join Date: Jul 2010
Location: Enschede, Netherlands
Posts: 198
rickrets is on a distinguished road
Default

Considering the stuff you want to happen and the time you so far put into it, order this book: beginning Iphone 3 Development (Mark & LaMarche)

Work it through and you will achieve what you want and a lot more.. it did that for me at least
rickrets is offline   Reply With Quote
Old 07-27-2010, 05:09 PM   #7 (permalink)
Registered Member
 
vincefried's Avatar
 
Join Date: Apr 2010
Location: Hamburg, Germany
Posts: 38
vincefried is on a distinguished road
Default

Thank you for all your answers, so far I'm finished with my App, but one last question: What do I have to use as the Object in the NSUserDefaults to save the tableview? Maybe the array? When I can save the tableview's content, the app will be ready for the appstore...
vincefried is offline   Reply With Quote
Reply

Bookmarks

Tags
contents, datepicker, iphone, saving, uitableview

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: 326
21 members and 305 guests
baja_yu, cgokey, chemistry, Domele, Duncan C, Fstuff, gbenna, givensur, heshiming, HowEver, iAppDeveloper, iphonedevshani, jbro, JoeRCruso, mdpauley, n00b, newDev, seokwon lee, SLIC, stanny, WheyLabs
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,112
Posts: 402,874
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

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