Is there way to change the background color of status bar right now it show white with black icons of battery i want the color black here is the code i am using in viewDidLoad
if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout = UIRectEdgeNone;
Set UIViewControllerBasedStatusBarAppearance
to NO. Call
[[UIApplication sharedApplication]
setStatusBarStyle:UIStatusBarStyleLightContent];
For more details...check this link
EDIT: try adding this
self.extendedLayoutIncludesOpaqueBars = YES;
in iOS 7 the status Bar is transparent. Make sure the background view is Dark if you are setting UIStatusBarStyleLightContent
For more info You can check the Apple UITransition Guide
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;
}
also check developers-guide-to-the-ios-7-status-bar