Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

oceandrive

macrumors newbie
Original poster
Nov 17, 2008
28
0
New to icoding. Can someone please guide me how to start my application from where I had exited earlier.

CaseStudy:

1) I opened my sample application
2) Entered some comments into the textarea.
3) Exit the application

4) Not if I open my applicaiton I want to see the data which I entered previously.

Thanks for help.
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
You'll want to save your data (using NSUserDefaults is pretty easy) in the applicationWillTerminate: method of your application delegate and then restore it in the applicationDidFinishLaunching: method of the same.
 

fenrus110

macrumors regular
Mar 24, 2008
142
0
check out the DrillDownSave sample.

Though, the TextView might be a bit trickier. I'd recommending looking for any events that execute just before the app closes and then save into NSUserDefaults or sqlite
 

oceandrive

macrumors newbie
Original poster
Nov 17, 2008
28
0
Thanks for the excellent help. I followed the example and it worked like what I wanted. Keep up the good work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.