【发布时间】:2014-02-19 11:20:34
【问题描述】:
touch + 上移时,webview 弹跳(底部的白色区域显示)(关闭按钮不受影响,因为它不在 webview 中)
在 web 视图中打开嵌入式 Vimeo 播放器时,我在禁用弹跳/滚动时遇到问题。播放器嵌入在 iframe 中 - 这使其成为 iframe 中的 iframe。
我已成功禁用 webview 和第一个 iframe 的滚动和弹跳,我使用此本机代码
for (id subview in webView.subviews)
if ([[subview class] isSubclassOfClass: [UIScrollView class]]) {
((UIScrollView *)subview).bounces = NO;
[[subview scrollView] setScrollEnabled: NO];
}
对于第一个 webview 和 iframe,我使用 javascript
addLoadEvent(function () {
document.ontouchmove = function(e){ e.preventDefault(); }
问题这适用于 webview 和第一个 iframe,但不适用于嵌入式 vimeo iframe。
【问题讨论】:
标签: ios iframe webview bounce vimeo-player