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

iOS Build a Simple iPhone App with Swift Improving Our User Interface Adding a Pop of Color

Black screen in ios simulator

My app stopped working when I changed the status bar to white. I don't have any errors in my code, but when I run it the ios simulator it's just a black screen. Any ideas? Here's my code

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. application.setStatusBarStyle(UIStatusBarStyle.LightContent, animated: false) return true }

Sean Rose
Sean Rose
341 Points

Same problem! Please help!

2 Answers

Sean Rose
Sean Rose
341 Points

Check:

http://stackoverflow.com/questions/14668445/launch-ios-simulator-from-xcode-and-getting-a-black-screen-followed-by-xcode-ha

^ The 2nd answer worked for me

Basically, need to make sure that the main interface is set to Main. For some reason, this was being set to blank after adding the target property and changing the app delegate at the end of the video (messed up for me when I was changing status bar to white). Hope that helps!

Sean Rose
Sean Rose
341 Points

Also, the bigger lesson here is to always Google the question you have and look for the answer on Stack overflow ;) I'm guilty of forgetting to do that sometimes!

cool. thanks Sean Rose for the link to the fix. sounds like it's a bug of some sort with xcode that changing that bit of code made it lose it's connection to the main storyboard? happy to know what to do if I get the black screen again.