How to show the same view when the application is open

I have a table view that shows a webview when I click on a row in a table, which in turn collects data from sqlite. if the user closes the application by pressing the "home" key, viewing the description in the web view and opening it again, I must make the user see the same screen. how to show the same look again? What is an effective way?

+3
source share
2 answers

Well, I think the easiest way is to save the state of the application in NSUserDefaults. UIApplication has a delegate method:

- (void)applicationWillTerminate:(UIApplication *)application

. , NSUserDefaults. , . , .

, , NSUserDefaults, -(void)applicationDidFinishLaunching:(UIApplication *)application .

+5

- , . , "screen_name: database_id". JSON JSON.

, , . , , .

0

Source: https://habr.com/ru/post/1750822/


All Articles