Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Force Status Icons (on the bar) to be White?

Hey guys,

So right now I have a black background image that covers the top third of my Storyboard to display white text on. The issue is that this black background is covering up all of my status bar and it will not display.

I want the status bar to stay black but turn the icons on it white. Is there a way to do that through the Storyboard or in my code?

1 Answer

I'm not sure how to close a discussion but I figured it out.

I needed to put the code below into my ViewController.m:

- (UIStatusBarStyle)preferredStatusBarStyle
    return UIStatusBarStyleLightContent;

I also had to go to my InfoPlist.strings and put:

UIViewControllerBasedStatusBarAppearance = YES;