hi i want create an application and my app remember last user action ,, it means user find himself in the same page as he was last time he ran the application .
how could implement that ?
hi i want create an application and my app remember last user action ,,
Share
you can use the NSUserDefaults to store some variable for your application to retrieve them after a close of the application.
For exemple:
To retrieve the last action of the user:
But you can add other than a string.
Edit:
define some constant like that on a header file:
When a view is load you store the current constant view to your standardUserDefaults. For example the view1:
When you application did load you retrieve your constant and you load your appropriate view:
I haven’t tested this code, but it’s something like that to do.