[英]Disable moving in an iPhone web application but leave scrolling?
要禁用本机tochemove事件通常需要使用:
document.body.addEventListener('touchmove', function(e){ e.preventDefault(); });
但是如果想要阻止移动窗口(屏幕边框)但是保留滚动页面内容的功能呢?
使用UIWebView以下代码可能会帮助您 -
UIWebView *webView = ...
//set zoom
UIScrollView *scrollView = [webView.subviews objectAtIndex:0];
[scrollView setZoomScale:0.0 animated:YES];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.