0

Is there any way to set the Color of the statusBar to an individual color. So that the icons are in blue or in green. I don´t want to change the Background color, only change color of the icons in the statusBar. I only found to set the statusBar to Default, LightContent, BlackTranslucentm BlackOpaque. Is there a way to use the own color?

Mohit
  • 3,708
  • 2
  • 27
  • 30

2 Answers2

0

Set the UIViewControllerBasedStatusBarAppearance to YES in the .plist file. in appdelegate

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

do this

 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];

in ios availble style's are

typedef NS_ENUM(NSInteger, UIStatusBarStyle) {
    UIStatusBarStyleDefault                                     = 0, // Dark content, for use on light backgrounds
    UIStatusBarStyleLightContent     NS_ENUM_AVAILABLE_IOS(7_0) = 1, // Light content, for use on dark backgrounds

    UIStatusBarStyleBlackTranslucent NS_ENUM_DEPRECATED_IOS(2_0, 7_0, "Use UIStatusBarStyleLightContent") = 1,
    UIStatusBarStyleBlackOpaque      NS_ENUM_DEPRECATED_IOS(2_0, 7_0, "Use UIStatusBarStyleLightContent") = 2,
};
BHASKAR
  • 1,201
  • 1
  • 9
  • 20
0

Unfortunately you can't change the status bar color to anything else than Default, LightContent, BlackTranslucent and BlackOpaque. Apple doesn't offer us any method for this and most likely won't.

Sebyddd
  • 4,305
  • 2
  • 39
  • 43