开发者

iPhone - Multiple instances of an application running?

When i start my app for the first time after installing it and exit before the splash screen disappears, from then on launching from the multitasking menu it comes up with a black screen. If I click on it from the home screen it loads fine but every time I try from the multitasking menu it is a black screen until I terminate it. If I add the UIApplcationExitOnSuspend property to the prope开发者_如何学Gorties list the black screen continually appears until i restart the device. Any help is appreciated.

Thanks Sj


A couple things:

  1. You probably don't want to suspend your app prior to the splash screen disappearing. applicationDidFinishLaunching is running code (you know, like adding a window to the app) while the splash screen is showing. If you suspend it early, it doesn't have a chance. This may not be the case after the first time install but if I were you, I'd give it the time it needs to do initial install instead of interrupting it.
  2. Another less likely scenario: Are you doing this while the debug is still running? I've only had an issue similar to this (black screen after suspend) if I leave debug running and then suspend the app to the background. As soon as you bring it back out of the background, you get a black screen, so in that case it's a bug. If you hit the stop sign button in XCode to kill the app, it worked fine after that.. but you have to kill it before suspending it.

My guess is your likely cause is #1. Give the app more time to do the initial load. After that, it should be fine. For whatever reason, the first time installing/loading is always the slowest.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜