Chapter 7 Persistence
29 Sep 2012, 20:45
J. Lincoln Barr (2 posts)
These comments about persistence are related to my complete StoryboardRecipies as well as your DocumentRecipies starter code. If I run either code on the phone (iPhone 5) or simulator, stop the app from Xcode then restart, it is true that the recipe(s) I added disappear. However, if I run the app from either the physical phone or simulator then press the home button, then relaunch the app, the data will automatically persist (It reappears in the list when I relaunch the app). How do I get it to not persist?
- Lincoln Barr
25 Nov 2012, 02:06
Jim West (2 posts)
When you press the HOME button, your app goes into the “background” and is still running.
To get it to stop running, press the HOME button twice to bring up the task list (icons at bottom).
Find your app.
Tap and hold your app until icons go into wiggle mode. Tap the red circle with the ”-” glyph on your app. It will disappear and thus be stopped.
Now if you re-launch your app you’ll note that your data does not persist. (assuming you’ve not added that bit to your code yet).
Hope this helps.
|You must be logged in to comment|