I want to set the colour of the status bar
(The small strip on top where the clock and battery is displayed) to black background with white text. How can I do
Goto Plist file
a) Set the value "View controller-based status bar appearance" to NO
b) Set the value "Status bar style" to UIStatusBarStyleLightContent
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(version) ([[[UIDevice currentDevice] systemVersion] compare:version options:NSNumericSearch] != NSOrderedAscending)
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 blackColor];
[self.window.rootViewController.view addSubview:view];
}
return YES;
}
It fixed status bar color for me. Hope it helps.