如何将 phonegap 2.9.0 更新到 3.0 或在 phonegap 应用程序中隐藏状态栏

How to update the phonegap 2.9.0 to 3.0 or hide the status bar in phonegap app?

本文关键字:phonegap 状态栏 或在 应用程序 隐藏 更新      更新时间:2023-09-26
我的

应用程序中遇到了问题,即状态栏显示,如果状态栏显示意味着页脚对齐将消失,一些谷歌搜索将PhoneGap版本升级到3.0,我不知道如何将其升级到3.0,version.is 可以通过javascript隐藏它。

您需要在项目的配置.xml中指定类似于此的全屏 true。 <preference name="Fullscreen" value="true" />

看看这里: http://docs.phonegap.com/en/3.1.0/config_ref_index.md.html#The%20config.xml%20File

如果您在

将phonegap与xcode/iOS一起使用时遇到此问题...要在xcode应用程序中隐藏iOS7的状态栏,我执行以下操作:

在应用程序中的 AppDelegate.m 中 didFinishLaunchingWithOptions: add

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
    [application setStatusBarStyle:UIStatusBarStyleLightContent];
}

并在 .plist 文件中添加两行:

Status bar is initially hidden YES
View controller-based status bar appearance NO

我正在使用Phonegap 3.0 CLI,我认为作为本机代码,这也应该适用于2.9。

我还强烈建议花时间通读如何在您的机器上设置 Phonegap CLI。理解新过程可能需要一点时间,但一旦你到达那里,你就再也不会回头;)http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface