Large page in UIWebview not always scrolling diagonally

家住魔仙堡 提交于 2019-12-11 04:58:21

问题


I have a page in a UIWebview whose main element is taller and wider than the webview itself. I'd like to be able to "pan" around the page smoothly in any way the user chooses: horizontally, vertically, diagonally or swiping in a circular motion.

Usually it works, however around once in every three gestures, the UIWebView scrolls on only one axis (sometimes x, sometimes y), despite gesturing on both simultaneously.

The problem tends to happen most often just after the webview has loaded. After a successful two-dimensional scroll it tends not to happen so often again.

Has anybody else seen this problem or any idea what to do about it?


回答1:


Found out what it was. I had a UIScrollViewDelegate listening to the UIWebView's UIScrollView for doing all sorts of other stuff I probably shouldn't. And the symptoms in the question are why!



来源:https://stackoverflow.com/questions/15577114/large-page-in-uiwebview-not-always-scrolling-diagonally

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