Reputation: 249
I'm new to phonegap and i try to set the status bar to the new light-content ios7 style.
Is there a possibility to do that yet?
My status bar looks like that...
... but I want to have this:
Thanks so much for any help :-)
Upvotes: 9
Views: 12064
Reputation: 4742
Open your info.plist
(resources folder):
like this:
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
Upvotes: 36
Reputation: 249
thanks for your answers. I've done everthing you wrote before, but it only takes effect on launchscreen, not in the app.
Finally I found the answer on StackOverflow, how to change the status bar style. In PhoneGap you can't do this at the moment I think.
Here is what I did to make it working: How to change Status Bar text color in iOS 7
Upvotes: 4
Reputation: 1168
Open the plist of the project as source code and add the following attributes
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
Also to set a custom color of status bar you can place the following code in AppDelegate.m - didFinishLaunchingWithOptions()
[[[[UIApplication sharedApplication] delegate] window] setBackgroundColor:[UIColor colorWithRed:0.8f green:0.8f blue:0.8f alpha:1]];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
Not having screen shots right now, how bad :P.
Upvotes: 6