Cordova / Phonegap在iOS上的config.xml中忽略全屏首选项 [英] Cordova/Phonegap ignores fullscreen preference in config.xml on iOS

查看:450
本文介绍了Cordova / Phonegap在iOS上的config.xml中忽略全屏首选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已定义

<preference name="Fullscreen" value="true"/>

但是通过Xcode部署它会忽略这一点。即使我在构建设置上设置了隐藏状态栏。我的所有其他config.xml设置似乎都有效,但不是这样。

But deploying through Xcode it ignores this. Even if I set hide status bar on the build settings. All my other config.xml settings seem to work, but not this.

推荐答案

全屏在iOS 7及更高版本上不起作用。相反,您可以使用 Cordova HiddenStatusbarOverlay插件来隐藏状态栏。

Fullscreen does not work on iOS 7 and above. Instead you can use Cordova HiddenStatusbarOverlay Plugin to hide the statusbar.

隐藏它的另一种方法是使用 gap:config-file 元素覆盖 UIViewControllerBasedStatusBarAppearance 属性:

Another way to hide it is to use a gap:config-file element to overwrite the UIViewControllerBasedStatusBarAppearance property:

<gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance" overwrite="true">
    <false/>
</gap:config-file>

这篇关于Cordova / Phonegap在iOS上的config.xml中忽略全屏首选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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