iPhone dev: Increase scroll speed in UIWebView?

后端 未结 5 1169
滥情空心
滥情空心 2021-02-09 04:41

I have an app in which I render local HTML files in a UIWebView. The files, however, are sometimes large, and getting to where you want takes a long time with the default scroll

5条回答
  •  借酒劲吻你
    2021-02-09 05:21

    In iOS 5 we can access the scrollView property of the UIWebView.

    If you are targeting iOS 5+, you can simply call:

    webView.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal;
    

提交回复
热议问题