views:

48

answers:

1

I have a universal iPhone / iPad application that I'd like to have support multitasking. On a multitasking OS, when my application goes to the background and then returns to the foreground, all I see is a black screen.

What could be causing this and how do you suggest I work around it?

A: 

Which iOS do you have? The new iOS 4 already supports multitasking. You have to call the App delegate's method applicationDidEnterBackground: "Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. If your application supports background execution, called instead of applicationWillTerminate: when the user quits."

To restore your application (restart any tasks that were paused (or not yet started) while the application was inactive) you have to call the App delegate's applicationDidBecomeActive method.

I would suggest you to read the UIApplicationDelegate Protocol Reference

jcdmb