How can I restore a WKWebView to the state it was before the app closed?

前端 未结 2 1514
我寻月下人不归
我寻月下人不归 2021-01-14 11:00

I run into a dead end. I just can\'t figure out a way for restoring a WKWebView after the user has closed the app. All the web pages he visited must be there when he re-open

2条回答
  •  独厮守ぢ
    2021-01-14 11:36

    you can store webpages in [NSDefaults standardUserDefaults] whenever the WKWebView has loaded.

    - (void)webView:(WKWebView *)webView didFinishNavigation: (WKNavigation *)navigation{
    
    }
    

提交回复
热议问题