Change status bar color Objective-C

Ok, according to Apple Docs setStatusBarStyle:animated: is deprecated since iOS 9.0, and you should now put this code instead:

-(UIStatusBarStyle)preferredStatusBarStyle 
{
return UIStatusBarStyleLightContent;
}

Good luck and happy coding! :)


May be below lines of code in didFinishLaunchingWithOptions method in AppDelegate.m could help:

[[UIApplication sharedApplication] setStatusBarHidden:NO];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];

if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) {

    statusBar.backgroundColor = [UIColor whiteColor];//set whatever color you like
}