iphone UIWebView store the current scroll position?

后端 未结 2 1896
忘掉有多难
忘掉有多难 2021-02-10 11:12

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 ..

How to do that ???

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-10 11:53

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

    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/

提交回复
热议问题