6

I want to design my navigation bar in IOS7 and i use this code.

  UIImage *navBackgroundImage = [UIImage imageNamed:@"navbar"];

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

But my status bar is not displayed(Please see the picture). I use this code in 2 project but other project is ok. I dont know what i am doing wrong Please help me.

This result I dont want

enter image description here

This status bar is correct.

enter image description here

1

1 Answer 1

2

In Info.plist set 'View controller-based status bar appearance' as NO

In AppDelegate add

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
  [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
}  

This solution works for iOS 7

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.