How to remove iOS status bar with Phonegap Build?

前端 未结 9 2027
走了就别回头了
走了就别回头了 2021-02-02 10:11

Is it possible to get rid of the status bar in iOS7 when using Phonegap Build 3.1? I can remove the status bar when building locally in Xcode, but as soon as I try Phonegap Buil

相关标签:
9条回答
  • 2021-02-02 10:59

    click on the "projectname-Info.plist" file under the XCode root project folder , you will be shown with an UI where you can see key vs values entries ,you can add/delete keys, add a new key just look for "Status bar is initially hidden" and set "YES" as the value.

    0 讨论(0)
  • 2021-02-02 11:04

    This worked for me:

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

    I'm working on Android.

    0 讨论(0)
  • 2021-02-02 11:05

    With Cordova, I had to do actually 2 things.

    1. When I build with XCode I set in Target->Statusbar style to -> HIDDEN this would hide statusbar at startup on your splash screen.

    2. You have to hide it also on device ready with plugin. Otherwise, it will reappear. To do that, install plugin:

    cordova plugin add org.apache.cordova.statusbar

    and call this on deviceready:

    StatusBar.hide();
    
    0 讨论(0)
提交回复
热议问题