Is there a way to change the color color of the top bar on an iPhone that shows the battery?
My phone is showing as black text on white background but I wanted to know how to change it to white text on a black background. How would this be done?
Is there a way to change the color color of the top bar on an iPhone that shows the battery?
My phone is showing as black text on white background but I wanted to know how to change it to white text on a black background. How would this be done?
Try this:
if ([self.navigationController.navigationBar respondsToSelector:@selector(setTranslucent:) ])
self.navigationController.navigationBar.translucent = NO;
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
Here try this:
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
If that doesn't work then change it in your info plist Status Bar Style to UIStatusBarStyleLightContent.
For iOS < 7, you can use any of the below mentioned styles apart from the default ones:
[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackOpaque];
[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
For iOS 7 follow these steps:
1. Set the UIViewControllerBasedStatusBarAppearance to YES in the plist
2. In viewDidLoad do a [self setNeedsStatusBarAppearanceUpdate];
3. Add the following method:
-(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}