iOS 4 app flickers and crashes when returning from background mode
I just converted an iPhone OS 3 app to iOS 4, and once in a while, the screen will flicker and then turn black when the app returns from background mode. Has anyone else experienced this?
I finally resorted to terminating the app before it enters background mode. This is definitely a temporary band a开发者_如何学运维id:
- (void)applicationDidEnterBackground:(UIApplication *)application {
// kill the app rather than letting it go into BG
exit(0);
}
Any advice would be great. Thanks.
What is the system doing when it enters the foreground?
It sounds a lot like a memory warning may be triggering views to unload in odd ways. I'd do some testing in the simulator around firing memory warnings when in various screens.
I'm pretty sure your exit() trick would block app store submission.
you can disable backgrounding using the info.plist UIApplicationExitsOnSuspend
You might be running into a "Failed to resume in time" error .. check the crash report via Organizer in XCode.
精彩评论