如何转发UIWebView滚动到UIScrollView? (有条件的) [英] how to forward UIWebView scroll to UIScrollView ? (conditionally)

查看:151
本文介绍了如何转发UIWebView滚动到UIScrollView? (有条件的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 UIScrollView 中有一个 UIWebView

当用户向上滚动网页时,此想法将能够在屏幕上创建更多阅读空间 - 向上滚动UIScrollView直到工具栏可见,显然当工具栏可见时,实际上滚动网页以显示页面上的更多内容。

This idea is to be able to create more reading space on screen when user scroll the webpage upwards - by scrolling the UIScrollView upwards till the toolbar is visible, and obviously when the toolbars is nomore visible actually scroll the webpage to show more content that's on the page.

IPhone Safari浏览器完全相同的功能。

IPhone Safari browser does exactly the same functionality.

查看屏幕截图(第一个)我得到的默认行为 - 我猜是因为:滚动消息被webview消耗,因为触摸/滚动是直接在webview区域发生。

see screenshot (first) for default behavior i am getting - i guess because : the scrolling message is consumed by the webview since the touch/scroll is happening directly on webview area.

我想在这里做的是programatiicaly决定何时将'向上滚动'转发到UIScrollivew以及何时不转发。

what i would like to do here is programatiicaly decide when to forward the 'upward scroll' to the UIScrollivew and when not to.

如何解决这个问题的任何提示都会非常有用。谢谢!!

Any tips on how to get around this will be so helpful. Thanks!!

推荐答案

高级ScrollView技术

https://developer.apple.com/videos/wwdc/2011/

这篇关于如何转发UIWebView滚动到UIScrollView? (有条件的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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