views:

270

answers:

1

In a game with 5 levels, how to save a name, highest score, levels(which currently he is).

A: 

Probably using NSUserDefaults is the easiest way to go. Me and my team came up with a nice class that encapsulates the use of this class for you...

http://getsetgames.com/2009/10/07/saving-and-loading-user-data-and-preferences/

Rob Segal
thanks a lot. If i Restart again without quitting i have the saved score but i didnt get my saved value when i reopen and compile.
Mythili
I'm not sure I follow your situation. When you say you restart without quitting what do you mean exactly? Do you mean restart without quitting from the simulator, running on the device, etc.?I could see saved data not being preserved on a re-compile/re-deploy to the simulator/device as it may be a new binary and therefore considered to be a new program. Not sure and just a guess at this point.
Rob Segal