One of the new “features” of iOS 6 is that you can now tint the status bar. Instead of Default (Grey), Black Transparent, or Black Opaque it can now be anything.
The way iOS decides what color the status bar should be is based on the color of the lowest pixel of a UINavigationBar component. Source
In a Cordova application, or any fullscreen UIWebView app, there’s no UINavigationBar by default, thus no way to tint the status bar.
There is a simple “hack” though that you can employ to get your status bar tinted, you only have to sacrifice one row of pixels.
Tinting your StatusBar in a Cordova project
- Open up your MainViewController.xib in XCode
- Drag a NavigationBar to your view
- Set the tint (color) of the navigation bar
- Set the position of the UINavigationBar to y: -43px;
- Set the position of the UINavigationBar to y: -43px;
- Set the tint (color) of the navigation bar
Now you’re all set. You should see something like this
Stan Bershadskiy
Related Posts
-
Taking Advantage of Status and Status Categories in Jira
Statuses in Atlassian’s Jira help product management teams organize, prioritize, and track where issues are…
-
Cross-Platform Cordova App Development with Merges
The Cordova CLI provides an often overlooked mechanism, called merges. This feature works irrespective of…