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

oceandrive

macrumors newbie
Original poster
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.
 
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.
 
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
 
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.