Archive/Unarchive UIWebView?

给你一囗甜甜゛ 提交于 2019-12-04 13:44:06

问题


I would like to save the current state of an UIWebView to disk in IPhone SDK.

I have a UIWebView that loads a website with lots of javascript. I would like to save the UIWebView state, maintaining the state of the javascript variables, http cookies, etc. at that moment.

Then at a later time, I would like to unarchive the UIWebview and display it on the screen with the exact same state as it was when it was archived.

Is this possible?


回答1:


I tried to do this on a previous project and there's no built-in serialization of UIWebView. There's a couple of ways to cache just the page but not the entire state such as javascript variables. This would require that the JVM's state be serialized as well which is not possible with the current SDK APIs.



来源:https://stackoverflow.com/questions/1283115/archive-unarchive-uiwebview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!