UIWebView 和 UIScrollView 滚动行为
这可能是一个愚蠢的问题,但我在滚动视图中插入了一个网页视图,不幸的是,滚动视图和网页视图在触摸时都不能像在 Safari 中那样流畅地移动。我该如何解决这个问题?有没有办法让它们滚动和缩放更流畅?抱歉我的拼写,但我不是[以英语为母语]。谢谢。
This might be a stupid question, but I inserted a webview in a scroll view, and unfortunately both the scrollview and the webview don't move fluently when touched like in Safari. How can I solve this problem? Is there any way to make them scroll and zoom more fluently? Sorry for my spelling but I'm not [a native English speaker]. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了能够更流畅地移动,您可以减少网站的内容。根据我的经验,
UIWebView
是非常重的对象(就内存和处理器而言)。据我所知,苹果一直在努力在同类产品中取得更好的表现。我无法想象一个简单的解决方案来解决这个问题。对于操作系统来说,即使加载单个UIWebView
也不是那么容易。但我可能是错的......顺便说一句:
UIWebView
已经实现了UIScrollView
,尽管它实际上不是子类并且它符合UIScrollViewDelegate
> 协议。To be able to move more fluently, you can probably reduce the contents of the websites. In my experience
UIWebView
s are really heavy objects (memory and processor wise talking). As far as I know, Apple is been trying to achieve a better performance of the class. I can't imagine a simple solution for this problem. Even loading a singleUIWebView
is not that easy for the OS. But I could be wrong ...BTW: A
UIWebView
already implements aUIScrollView
, though it is not actually a subclass and it conforms to theUIScrollViewDelegate
protocols.UIWebView
已经是UIScrollView
所以你不应该再次使用UIScrollView
类。使用 UIWebView 的 delgete 方法。UIWebView
is allready a subclass ofUIScrollView
so you shouldn't useUIScrollView
class again. Use delgete methods ofUIWebView
.