0

I have a quick question for you. Is it posible to change the color of the status bar in iOS 7 (Like Facebook app) And is it also possible to increase the transparency of the status bar ?

Thank you in advance, Davy

rmaddy
  • 314,917
  • 42
  • 532
  • 579
dave
  • 1
  • 2
  • http://stackoverflow.com/questions/18929864/how-do-i-change-the-navigation-bar-color-in-ios-7/18929980#18929980 – Rajneesh071 Oct 03 '13 at 13:51

2 Answers2

0
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)?YES:NO) {
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"newImage.png"] forBarMetrics:UIBarMetricsDefault];
}else{
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"previousImage.png"] forBarMetrics:UIBarMetricsDefault];
}

Or you can also do this:

[UINavigationBar appearance].barTintColor = [UIColor redColor];

if you are not showing navigation bar in your application.

Utkarsh Goel
  • 245
  • 2
  • 5
  • thank you for your quick response I have to put this code in the viewDidLoad? – dave Oct 03 '13 at 12:38
  • yes you can put it in viewDidLoad but before that you should have botj images as newimage with size 320x64 and previousimage with size 320x44. – Utkarsh Goel Oct 03 '13 at 13:16
0

You can change navigation bar color to change status bar color.

[UINavigationBar appearance].barTintColor = [UIColor greenColor];
Rajneesh071
  • 30,846
  • 15
  • 61
  • 74