Cordoba: How do you hide the status bar on the splash / launch screen?

I am trying to remove the status bar through my application using Cordoba. I tried <preference name="Fullscreen" value="true" /> but it doesn't seem to work in iOS7. (And iOS6, he left a black gap.)

Since then I have used the StatusBar plugin and just shot StatusBar.hide(); on the device, but this will not hide the status bar on the launch screen. Is there a way to hide the status bar across the entire application in iOS7 and not overwrite it every time I create a cord? Thanks.

+7
ios cordova cordova-3
source share
5 answers

This is not a complete answer that forces Cordoba to do this automatically. But I went into my .plist file for iOS build and added:

 UIStatusBarHidden = true UIViewControllerBasedStatusBarAppearance = false 

This makes him behave correctly and is not overwritten by Cordova when I do the assembly, so it will work for now.

If someone finds or knows a better way to enforce these parameters, feel free to post it, and I will either update this answer or choose your next time I notice it. Thanks!

+9
source share

Status bar

To remove the status bar in iOS 7, use the following entries in the plist file.

 <key>UIStatusBarHidden</key> <true/> <key>UIViewControllerBasedStatusBarAppearance</key> <false/> 

In Xcode configuration, the following is achieved by the same

 set Status bar is initially hidden = YES add row: View controller-based status bar appearance = NO 
+5
source share

Do not waste your time, just do it simply in the status bar of the burst / start time.

enter image description here

+4
source share

You saw the following:

http://ionicframework.com/tutorials/fullscreen-apps/

Firstly, we should note that this only works on Cordoba (I recommend v3.3.1) or another native UIWebView wrapper. If we use Cordoba, we will need to install one plugin:

 $ cordova plugin add org.apache.cordova.statusbar 

Then we will use the Ionic Platform service to listen for the device ready event and delete the status bar:

 angular.module('myApp', ['ionic']) .controller('MyCtrl', function($scope, Platform) { Platform.ready(function() { // hide the status bar using the StatusBar plugin StatusBar.hide(); }); }); 
+1
source share

Updated:

We can also add info.plist directly from config.xml.

 <config-file parent="UIStatusBarHidden" platform="ios" target="*-Info.plist"> <true /> </config-file> <config-file parent="UIViewControllerBasedStatusBarAppearance" platform="ios" target="*-Info.plist"> <false /> </config-file> 

The first configuration will hide the status bar on the splash / lunch screen. The second config will hide the status bar after the splash / lunch screen.

0
source share

All Articles