Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 UIWebView 的当前状态保存到 iPhone SDK 中的磁盘。
我有一个 UIWebView 加载一个包含大量 javascript 的网站。我想保存 UIWebView 状态,维护 javascript 变量、http cookie 等的状态。
然后稍后,我想取消归档 UIWebview 并将其显示在屏幕上,其状态与归档时完全相同。
这可能吗?
我尝试在以前的项目中这样做,并且没有内置的 UIWebView 序列化。有几种方法可以只缓存页面而不是整个状态,例如 javascript 变量。这将需要对 JVM 的状态进行序列化,而当前的 SDK API 无法做到这一点。