Reputation: 250
I run/build my Meteor web app with Cordova for iOS. Unfortunately, I get a full-screen app that covers the top status bar (that includes the carrier, time, battery etc.) I am trying to avoid it - have a regular (i.e. not fullscreen) app.
I've explicitly set the fullscreen preference to false:
App.setPreference('Fullscreen', false);
But still the app will take 100% of the screen height. I'm using ionic too, if it matters.
Any ideas?
Upvotes: 2
Views: 1105
Reputation: 75945
This is handled by the status bar plugin:
App.setPreference("StatusBarOverlaysWebView", false);
So if you set this to false, the web view will no longer overlay the status bar and it will not be 'full screen'.
You also have a few other preferences to control the colour ot the status bar. From the status bar plugin docs:
StatusBarBackgroundColor (color hex string, no default value). On iOS 7, set the background color of the statusbar by a hex string (#RRGGBB) at startup. If this value is not set, the background color will be transparent.
<preference name="StatusBarBackgroundColor" value="#000000" />
StatusBarStyle (status bar style, defaults to lightcontent). On iOS 7, set the status bar style. Available options default, lightcontent, blacktranslucent, blackopaque.
<preference name="StatusBarStyle" value="lightcontent" />
The only difference between the docs, aimed at Cordova, and Meteor is the preferences are set using App.setPreference
in your mobile-config.js
file instead of <preference name=...
. in a config.xml
You can use the Cordova notation if you build your own config.xml but it should not be necessary as the Meteor notation is able to pass these along to the config.xml
it builds for you in the background.
Upvotes: 2