Cannot change WKWebView's scroll rate on iOS 9 beta / 9.3

送分小仙女□ 提交于 2019-11-30 09:25:54
Hekod

Update: this has been fixed but not deployed in iOS 9.3 (see workaround below). More detail here:


I had the same issue and it seems to be a bug in iOS 9.

The workaround is to set it in the will begin dragging delegate instead of at the time of instantiation:

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
    scrollView.decelerationRate = UIScrollViewDecelerationRateNormal;
}

I also used to get sporadic crashes, then I set

webview.scrollView.delegate = nil 

in deinit.

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