UIWebview 中的大页面并不总是对角滚动 [英] Large page in UIWebview not always scrolling diagonally

查看:21
本文介绍了UIWebview 中的大页面并不总是对角滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 UIWebview 中有一个页面,其主要元素比 webview 本身更高更宽.我希望能够以用户选择的任何方式平滑地平移"页面:水平、垂直、对角或以圆周运动滑动.

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.

通常它可以工作,但是每三个手势大约一次,UIWebView 仅在一个轴(有时是 x,有时是 y)上滚动,尽管同时在​​两个轴上进行了操作.

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.

该问题往往在 webview 加载后最常发生.在成功的二维滚动之后,它往往不会再次发生.

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.

有没有其他人看到过这个问题或知道如何处理它?<​​/p>

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

推荐答案

找出它是什么.我有一个 UIScrollViewDelegate 听 UIWebView 的 UIScrollView 做各种我可能不应该做的其他事情.问题中的症状就是为什么!

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!

这篇关于UIWebview 中的大页面并不总是对角滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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