我们正在将现有的Titanium经典应用程序迁移到Titanium SDK 8.2.0GA以及更高版本。我们遇到的问题,在激活缩放/捏缩放功能在iOS WebViews与加载的html页面。我们假设问题是由于UiWebView与WKWebView的兼容性,但我们无法看到我们必须应用设置以重新启用缩放功能。html页面,包括js和其他应用程序在8.2.0GA上工作起来很有魅力。
谢谢你的建议。
'Viewport setting works perfect in SDK 7.4.0 but does not zoom in SDK 8.2.0GA
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=10.0, user-scalable=yes"/>
'This is an example webview we use
var webView = Ti.UI.createWebView({
left : gutter,
top : gutter,
right : gutter,
bottom : gutter,
// This allows the translucent view and the background to shine through. You could set this to a standard RGB color and change the opacity if desired.
backgroundColor : translucentViewOn ? 'transparent' : backgroundColor,
opacity : animationsOn ? 0 : 1,
enableZoomControls : true, // Android only
// Default assumes that all HTML is in the HTML folder and the first file is index.html, you can change the next line to suit your HTML.
url : '/HTML/index.html'
});
1条答案
按热度按时间a64a0gku1#
万一别人也需要缩放。我们找到了正确的设置: