I have a feeling there is a simple way to do this. I have a number between 1 and 100 and it is stored in a variable called firstValue. This variable is then put into a UILabel. When the user exits my app, I want this firstValue to be saved so that when the app is loaded by the user this number can be re-inserted into the UILabel (firstValueLabel.text).
Many thanks,
Stuart
You can use NSUserDefaults for this.
To save it:
To read it:
If no previous value has been saved, the value returned will be 0.
Add this to your applicationWillTerminate: