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!
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

Tom Coomer
1,331 PointsWhite status bar
How do I make the status bar text white in xcode 5 for ios 7?
2 Answers

Marshall Huss
3,504 PointsIf you're using a UINavigationController
then put this code in the -viewDidLoad
method of your initial view controller.

Marshall Huss
3,504 PointsTo make the status bar text white you need to set the -barStyle on the UINavigationBar to UIBarStyleBlack
.
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;

Tom Coomer
1,331 PointsWhere do I put this code?
Tom Coomer
1,331 PointsTom Coomer
1,331 PointsI am just using a single view.
Marshall Huss
3,504 PointsMarshall Huss
3,504 PointsTry this then in the
-viewDidLoad
method.[UIApplication sharedApplication].statusBarStyle = UIBarStyleBlack;
Tom Coomer
1,331 PointsTom Coomer
1,331 PointsIt still has not changed. od i need to do something elsewhere?
Marshall Huss
3,504 PointsMarshall Huss
3,504 PointsOK, try adding the following method to your view controller.
Tom Coomer
1,331 PointsTom Coomer
1,331 PointsPERFECT!! Thank you! I am also having difficulties with iAds since i have opened my app in xcode 5. Is there a quick fix for this?