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

sldice

macrumors newbie
Original poster
Oct 24, 2010
20
0
I know this is probably basic, but I am brand new to programming and I am struggling to find the answer. Here is what I have:

A music trivia app with a score, timer, and 4 buttons as answers. Each question is on it's own separate viewController/xib file. If you get the question correct you choose next and it goes to the next question(viewController). Sorry if my terms are incorrect.

All I want to do is when the app terminates, when you relaunch, it goes to my Start screen and they can choose to start again, or continue where the app terminated. Can someone please help me with this? I need to return to the last question when terminates, and save the score. Thank you in advance.
 
There is no generic answer here: you need to work out what state you need to save to restore the objects in your application back to where you are. Once you do that my normal method is to store the details to NSUserDefaults. You may find using key-value coding and a NSCoder helps.
 
Thank you for your response. Are you aware of any good tutorials or websites that help explain how to make this work or understand better? I just can't seem to grasp how to do it.
 
Thank you for your response. Are you aware of any good tutorials or websites that help explain how to make this work or understand better? I just can't seem to grasp how to do it.



You could start with the Mac Guides at the top of the forums.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.