I am setting status bar colour in appdelegate class as below.
- (void)transitionToViewController:(UIViewController *)viewController
withTransition:(UIViewAnimationOptions)transition
{
self.window.rootViewController = viewController;
//SET STATUS BAR COLOR
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
{
UIView *view=[[UIView alloc] initWithFrame:CGRectMake(0, 0,[UIScreen mainScreen].bounds.size.width, 20)];
view.backgroundColor= [UIColor colorWithRed:0.96 green:0.96 blue:0.96 alpha:1.0];
[self.window.rootViewController.view addSubview:view];
}
}
When I try to remove it from a single screen I am failing. It keeps the background colour as I set in appdelegate but removes texts. I want to remove also the background.
Here how I try to remove the status bar:
[[UIApplication sharedApplication] setStatusBarHidden:YES];
and status bar looks like this: