Cordova/Phonegap ignores fullscreen preference in config.xml on iOS

纵然是瞬间 提交于 2019-12-19 03:28:06

问题


I have defined

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

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.


回答1:


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

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>



回答2:


use following preference tag. that works fine for me.

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


来源:https://stackoverflow.com/questions/28546873/cordova-phonegap-ignores-fullscreen-preference-in-config-xml-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!