iphone UIWebView存储当前滚动位置? [英] iphone UIWebView store the current scroll position?

查看:113
本文介绍了iphone UIWebView存储当前滚动位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想存储webView的当前滚动位置以及何时再次启动应用程序。我想再次恢复滚动位置..

i want to store the current scroll position of a webView and when i launch the application again . i want to restore that scroll position again ..

怎么做?

推荐答案

UIWebView不是UIScrollView的子类,所以你不能以正常的方式做到这一点。

UIWebView is not a subclass of UIScrollView so you can't do it the "normal" way.

看起来这个javascript解决方案会做什么你需要: http://shortdivision.wordpress.com/2008/10/14/going-back-to-the-last-place-you-were-in-a-uiwebview/

Looks like this javascript solution will do what you need: http://shortdivision.wordpress.com/2008/10/14/going-back-to-the-last-place-you-were-in-a-uiwebview/

这篇关于iphone UIWebView存储当前滚动位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆