I don't know how can I set the background color of UIStatusBar
as black in iOS7 while background color of navigation bar is not black.and as in iOS7 navigationbar is tranparent so status bar get backgroundcolor from background color of UINavigationBar.and text over statusbar should be of white color.I have used UIStatusBarStyleBlackOpaque but it is also deprecated in iOS7.I know I can change the textcolor of statusbar as white by setting StatusBarStyle
as UIStatusBarStyleLightContent.
And for setting the background color of UIStatusBar as black i have used below code:-
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
UIView *addStatusBar = [[UIView alloc] init];
addStatusBar.frame = CGRectMake(0, 0, 320, 20);
addStatusBar.backgroundColor = [UIColor blackColor];
[self.window.rootViewController.view addSubview:addStatusBar];
}
By above code i have manually added uiview in place of status bar of needed color. The problem is that by this uistatusbar is gone to back of the black view i.e. addStatusBar and thus text over status bar is hidden.
How to solve it?
Please Help !! Thanks in Advance !!