title: Xcode: Saving an Int value
body: <p>I have a simple counter application, i.e. the user presses a button to increase it by a value of their choice. I started the application production on a single view application. I now have the need to make it so that when the app is closed it saves the last value of the counter. Then when the app reopens it needs to load the value of the counter back into place. The value needs to be saved and reloaded simply by closing and opening the app i.e. no buttons are needed to be pressed.</p>
  
  <p>My counter variable is an <code>Int</code> value called <code>counter</code>. The view controllers are simply named <code>viewController.h/m</code>.</p>
  
  <p>I have no idea how to set all of this up, I assume I need coreData to do this. How do I set up coreData? Do I code in my delegate of viewController? If this is not the best way to do it please provide a way to do it in a more effective way!</p>
  
  <p>Thanks very much for any help, simple instructions appreciated most of all.
  I have had a look at other example of this but none seemed to provide what I need or were simple enough to understand. Please provide an answer on this thread!</p>
  
  <p>Hugh</p>