在iOS上放大缩小phoneGap [英] Zoom in zoom out in phoneGap for iOS

查看:204
本文介绍了在iOS上放大缩小phoneGap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用HTML5 / PhoneGap开发iOS的学习型应用程序,但面对缩放功能中的一些问题。
我知道PhoneGap在UIwebview中运行应用程序。所以放大缩小功能应该在PhoneGap中自动工作,但它不工作,虽然它可以在Safari浏览器上工作。
可能有一些请指导我如何实现这个功能。

I am developing an learning type application for iOS using HTML5/PhoneGap, but facing some problem in zoom in zoom out features. As I know PhoneGap runs app inside the UIwebview. so Zoom in Zoom out feature should work automatically in PhoneGap, but it is not working, although it works on Safari browser. Could some please guide how can I implement this feature.

虽然我也设置uiwebview mutitouch启用。
在mainviewcontrollers内webviewdidfinish loading ..

Although I also set uiwebview mutitouch enabled. inside mainviewcontrollers webviewdidfinish loading..

[theWebView setMultipleTouchEnabled:YES];

提前感谢。
请指导我

Thanks in advance. Please guide me

推荐答案

我有另一个替代解决方案。它需要更改main / Root index.html文件。添加此类元标记

There is an another alternate solution I got. It needs to change the main/Root index.html file. Add a meta tag like this

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1.5, user-scalable=yes">

并且不需要像nativeviewcontroller.m或类似的其他本地代码编辑任何文件。

And no need to edit any file in native code like mainviewcontroller.m or similar other.

它比以前的解决方案更好的工作。

Its better working than previous solution.

这篇关于在iOS上放大缩小phoneGap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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