0

What delegate is called in this situation if I have an app running.

Over time, if iPad is set to lock after 2 mins, what is its state? Does the app still run? or does it suspend?

I'd like to know thanks

LB.
  • 13,730
  • 24
  • 67
  • 102

1 Answers1

3

If the iOS device automatically locks after a period of inactivity, the same thing happens as when it's locked by pressing the lock button: the app briefly goes into the background before being suspended. (Unless of course it is an audio-playing app or other app that requests extra execution time, in which case it may stay in the background longer, or indefinitely, without being suspended).

In terms of UIApplicationDelegate methods, applicationWillResignActive: will be called first, followed by applicationDidEnterBackground:.

yuji
  • 16,695
  • 4
  • 63
  • 64
  • alright cool, if I have stuff downloading, is there a way to prevent it from being inactive? – LB. Feb 13 '12 at 00:56
  • Yeah, see this question: http://stackoverflow.com/questions/4704037/download-data-in-background-with-ios4 – yuji Feb 13 '12 at 08:10