Vipin K V Ias Vipin K V Ias - 17 days ago 7
iOS Question

How to set status bar color same as to Navigation bar color in iOs 7 using Xcode 4.2

Now i Am using Xcode 4.2 to develop app.and the app is running on iOS 7 iPhone.My problem related with status bar color.I want the status bar color is same color as of navigation bar color.I am using this code for setting navigation bar image ,here is my code:

[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"nav_bar.png"] forBarMetrics:UIBarMetricsDefault];


How we can set the status bar color?now is light gray color>>Many thanks....

Answer

In iOS6 you can't change the image or the color of the status bar apart from this 2 styles:

[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackOpaque];

[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackTranslucent];