Originally by Patrick Heneise (@PatrickHeneise, about.me/PatrickHeneise). Updated by Chad Drobish, website
Addapted for ios7 by jota-v.
Change the style of the status bar in iOS, in any instance of your app. You can show it, hide it, change the tint to white or black. All transitions are animated. Phonegap 3.0+ compatible.
-
Make sure that you have Node and Cordova CLI or PhoneGap's CLI or Cordova Plugman installed on your machine.
-
Add a plugin to your project using Cordova CLI:
cordova plugin add https://github.com/cdrobish/statusbar-phongeap-plugin
Or using PhoneGap CLI:
phonegap local plugin add https://github.com/cdrobish/statusbar-phongeap-plugin
Or using plugman CLI:
plugman --platform ios --project ./platforms/ios --plugin https://github.com/cdrobish/statusbar-phongeap-plugin
- Edit your .plist (Located in Xcode Project > Resources Add Key 'View controller-based status bar appearance' and set value to NO
Note If you'd like the default color to be white you can also add key 'Status bar style' and set value to UIStatusBarStyleLightContent
statusbar.hide();
statusbar.show();
statusbar.whiteTint(callback);
statusbar.blackTint(callback);
Enjoy!