Catalin Craciun
Catalin Craciun

Reputation: 284

Status bar style issue

I need a Light content status bar for my iOS 8 app but it will show up as Dark. This thing persists and I can't get it work.

What I have tried so far:

None of the above works, I get a Light content on the Loading Screen Storyboard but it gets dark as soon as it loads the starting UIViewController from the storyboard. Any thoughts why this is happening?

Upvotes: 0

Views: 91

Answers (1)

Azat
Azat

Reputation: 6795

Put that code in your view controller

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setNeedsStatusBarAppearanceUpdate];
}

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

Upvotes: 1

Related Questions