简体   繁体   中英

Black screen on app launch after latest Xcode 7.2 update

i am making a very complicated app with a lot of classes. my app worked great and i worked on it for the last month. the last time i worked on it i added a function and it worked great, i saved the app and ran it a few times since and it worked. the last time i turned my computer on, it prompted me that an update for xcode is available. i updated it, and since then every time i run my app it runs with no errors but on ios simulator it shows a black screen. what can i do? i worked really hard on that app. thanks for the help in advance.

There's few issues that could happened, withou detailed description of this issue, you can try following solutions:

  • reset simulator

在此处输入图片说明

  • check if your initial controller is set up in storyboard(select controller and press attribute inspector, select is initial view controller):

在此处输入图片说明

  • if you're setting initial view controller programmatically, check if that controller is not nil in app delegate

another tip - try to use UI debugger, that helps a lot:

在此处输入图片说明

Any debug messages in the Xcode output? That usually will give a clue.

One thing I can think of, is that in your

- (void) applicationDidFinishLaunching:(UIApplication*)application

delegate, try setting the window's root view controller to your view controller. Example:

[window setRootViewController:viewController];
[window makeKeyAndVisible];

Again, the Xcode debug output will confirm if this is indeed the case though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM