Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


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;